ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

arbprogparse.c File Reference
#include "main/glheader.h"
#include "main/imports.h"
#include "main/context.h"
#include "main/macros.h"
#include "main/mtypes.h"
#include "shader/grammar/grammar_mesa.h"
#include "arbprogparse.h"
#include "program.h"
#include "prog_parameter.h"
#include "prog_statevars.h"
#include "prog_instruction.h"
#include "arbprogram_syn.h"
#include "shader/grammar/grammar_syn.h"

Go to the source code of this file.

Data Structures

struct  arb_program
struct  var_cache

Defines

#define DEBUG_PARSING   0
#define MAX_INSTRUCTIONS
#define REVISION   0x0a
#define FRAGMENT_PROGRAM   0x01
#define VERTEX_PROGRAM   0x02
#define OPTION   0x01
#define INSTRUCTION   0x02
#define DECLARATION   0x03
#define END   0x04
#define ARB_PRECISION_HINT_FASTEST   0x00
#define ARB_PRECISION_HINT_NICEST   0x01
#define ARB_FOG_EXP   0x02
#define ARB_FOG_EXP2   0x03
#define ARB_FOG_LINEAR   0x04
#define ARB_POSITION_INVARIANT   0x05
#define ARB_FRAGMENT_PROGRAM_SHADOW   0x06
#define ARB_DRAW_BUFFERS   0x07
#define MESA_TEXTURE_ARRAY   0x08
#define OP_ALU_INST   0x00
#define OP_TEX_INST   0x01
#define OP_ALU_VECTOR   0x00
#define OP_ALU_SCALAR   0x01
#define OP_ALU_BINSC   0x02
#define OP_ALU_BIN   0x03
#define OP_ALU_TRI   0x04
#define OP_ALU_SWZ   0x05
#define OP_TEX_SAMPLE   0x06
#define OP_TEX_KIL   0x07
#define OP_ALU_ARL   0x08
#define OP_ABS   0x00
#define OP_ABS_SAT   0x1B
#define OP_FLR   0x09
#define OP_FLR_SAT   0x26
#define OP_FRC   0x0A
#define OP_FRC_SAT   0x27
#define OP_LIT   0x0C
#define OP_LIT_SAT   0x2A
#define OP_MOV   0x11
#define OP_MOV_SAT   0x30
#define OP_COS   0x1F
#define OP_COS_SAT   0x20
#define OP_EX2   0x07
#define OP_EX2_SAT   0x25
#define OP_LG2   0x0B
#define OP_LG2_SAT   0x29
#define OP_RCP   0x14
#define OP_RCP_SAT   0x33
#define OP_RSQ   0x15
#define OP_RSQ_SAT   0x34
#define OP_SIN   0x38
#define OP_SIN_SAT   0x39
#define OP_SCS   0x35
#define OP_SCS_SAT   0x36
#define OP_POW   0x13
#define OP_POW_SAT   0x32
#define OP_ADD   0x01
#define OP_ADD_SAT   0x1C
#define OP_DP3   0x03
#define OP_DP3_SAT   0x21
#define OP_DP4   0x04
#define OP_DP4_SAT   0x22
#define OP_DPH   0x05
#define OP_DPH_SAT   0x23
#define OP_DST   0x06
#define OP_DST_SAT   0x24
#define OP_MAX   0x0F
#define OP_MAX_SAT   0x2E
#define OP_MIN   0x10
#define OP_MIN_SAT   0x2F
#define OP_MUL   0x12
#define OP_MUL_SAT   0x31
#define OP_SGE   0x16
#define OP_SGE_SAT   0x37
#define OP_SLT   0x17
#define OP_SLT_SAT   0x3A
#define OP_SUB   0x18
#define OP_SUB_SAT   0x3B
#define OP_XPD   0x1A
#define OP_XPD_SAT   0x43
#define OP_CMP   0x1D
#define OP_CMP_SAT   0x1E
#define OP_LRP   0x2B
#define OP_LRP_SAT   0x2C
#define OP_MAD   0x0E
#define OP_MAD_SAT   0x2D
#define OP_SWZ   0x19
#define OP_SWZ_SAT   0x3C
#define OP_TEX   0x3D
#define OP_TEX_SAT   0x3E
#define OP_TXB   0x3F
#define OP_TXB_SAT   0x40
#define OP_TXP   0x41
#define OP_TXP_SAT   0x42
#define OP_KIL   0x28
#define OP_ARL   0x02
#define OP_EXP   0x08
#define OP_LOG   0x0D
#define FRAGMENT_ATTRIB_COLOR   0x01
#define FRAGMENT_ATTRIB_TEXCOORD   0x02
#define FRAGMENT_ATTRIB_FOGCOORD   0x03
#define FRAGMENT_ATTRIB_POSITION   0x04
#define VERTEX_ATTRIB_POSITION   0x01
#define VERTEX_ATTRIB_WEIGHT   0x02
#define VERTEX_ATTRIB_NORMAL   0x03
#define VERTEX_ATTRIB_COLOR   0x04
#define VERTEX_ATTRIB_FOGCOORD   0x05
#define VERTEX_ATTRIB_TEXCOORD   0x06
#define VERTEX_ATTRIB_MATRIXINDEX   0x07
#define VERTEX_ATTRIB_GENERIC   0x08
#define FRAGMENT_RESULT_COLOR   0x01
#define FRAGMENT_RESULT_DEPTH   0x02
#define VERTEX_RESULT_POSITION   0x01
#define VERTEX_RESULT_COLOR   0x02
#define VERTEX_RESULT_FOGCOORD   0x03
#define VERTEX_RESULT_POINTSIZE   0x04
#define VERTEX_RESULT_TEXCOORD   0x05
#define TEXTARGET_1D   0x01
#define TEXTARGET_2D   0x02
#define TEXTARGET_3D   0x03
#define TEXTARGET_RECT   0x04
#define TEXTARGET_CUBE   0x05
#define TEXTARGET_SHADOW1D   0x06
#define TEXTARGET_SHADOW2D   0x07
#define TEXTARGET_SHADOWRECT   0x08
#define TEXTARGET_1D_ARRAY   0x09
#define TEXTARGET_2D_ARRAY   0x0a
#define TEXTARGET_SHADOW1D_ARRAY   0x0b
#define TEXTARGET_SHADOW2D_ARRAY   0x0c
#define FACE_FRONT   0x00
#define FACE_BACK   0x01
#define COLOR_PRIMARY   0x00
#define COLOR_SECONDARY   0x01
#define COMPONENT_X   0x00
#define COMPONENT_Y   0x01
#define COMPONENT_Z   0x02
#define COMPONENT_W   0x03
#define COMPONENT_0   0x04
#define COMPONENT_1   0x05
#define ARRAY_INDEX_ABSOLUTE   0x00
#define ARRAY_INDEX_RELATIVE   0x01
#define MATRIX_MODELVIEW   0x01
#define MATRIX_PROJECTION   0x02
#define MATRIX_MVP   0x03
#define MATRIX_TEXTURE   0x04
#define MATRIX_PALETTE   0x05
#define MATRIX_PROGRAM   0x06
#define MATRIX_MODIFIER_IDENTITY   0x00
#define MATRIX_MODIFIER_INVERSE   0x01
#define MATRIX_MODIFIER_TRANSPOSE   0x02
#define MATRIX_MODIFIER_INVTRANS   0x03
#define CONSTANT_SCALAR   0x01
#define CONSTANT_VECTOR   0x02
#define PROGRAM_PARAM_ENV   0x01
#define PROGRAM_PARAM_LOCAL   0x02
#define REGISTER_ATTRIB   0x01
#define REGISTER_PARAM   0x02
#define REGISTER_RESULT   0x03
#define REGISTER_ESTABLISHED_NAME   0x04
#define PARAM_NULL   0x00
#define PARAM_ARRAY_ELEMENT   0x01
#define PARAM_STATE_ELEMENT   0x02
#define PARAM_PROGRAM_ELEMENT   0x03
#define PARAM_PROGRAM_ELEMENTS   0x04
#define PARAM_CONSTANT   0x05
#define STATE_MATERIAL_PARSER   0x01
#define STATE_LIGHT_PARSER   0x02
#define STATE_LIGHT_MODEL   0x03
#define STATE_LIGHT_PROD   0x04
#define STATE_FOG   0x05
#define STATE_MATRIX_ROWS   0x06
#define STATE_TEX_ENV   0x07
#define STATE_DEPTH   0x08
#define STATE_TEX_GEN   0x09
#define STATE_CLIP_PLANE   0x0A
#define STATE_POINT   0x0B
#define MATERIAL_AMBIENT   0x01
#define MATERIAL_DIFFUSE   0x02
#define MATERIAL_SPECULAR   0x03
#define MATERIAL_EMISSION   0x04
#define MATERIAL_SHININESS   0x05
#define LIGHT_AMBIENT   0x01
#define LIGHT_DIFFUSE   0x02
#define LIGHT_SPECULAR   0x03
#define LIGHT_POSITION   0x04
#define LIGHT_ATTENUATION   0x05
#define LIGHT_HALF   0x06
#define LIGHT_SPOT_DIRECTION   0x07
#define LIGHT_MODEL_AMBIENT   0x01
#define LIGHT_MODEL_SCENECOLOR   0x02
#define LIGHT_PROD_AMBIENT   0x01
#define LIGHT_PROD_DIFFUSE   0x02
#define LIGHT_PROD_SPECULAR   0x03
#define TEX_ENV_COLOR   0x01
#define TEX_GEN_EYE   0x01
#define TEX_GEN_OBJECT   0x02
#define FOG_COLOR   0x01
#define FOG_PARAMS   0x02
#define DEPTH_RANGE   0x01
#define POINT_SIZE   0x01
#define POINT_ATTENUATION   0x02
#define ATTRIB   0x01
#define PARAM   0x02
#define TEMP   0x03
#define OUTPUT   0x04
#define ALIAS   0x05
#define ADDRESS   0x06

Typedefs

typedef GLubyteproduction

Enumerations

enum  var_type {
  vt_none, vt_address, vt_attrib, vt_param,
  vt_temp, vt_output, vt_alias
}

Functions

static GLvoid var_cache_create (struct var_cache **va)
static GLvoid var_cache_destroy (struct var_cache **va)
static GLvoid var_cache_append (struct var_cache **va, struct var_cache *nv)
static struct var_cachevar_cache_find (struct var_cache *va, const GLubyte *name)
static void program_error (GLcontext *ctx, GLint position, const char *descrip)
static void program_error2 (GLcontext *ctx, GLint position, const char *descrip, const char *var)
static GLuint parse_position (const GLubyte **inst)
static struct var_cacheparse_string (const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program, GLuint *found)
static charparse_string_without_adding (const GLubyte **inst, struct arb_program *Program)
static GLint parse_sign (const GLubyte **inst)
static GLint parse_integer (const GLubyte **inst, struct arb_program *Program)
static GLdouble parse_float_string (const GLubyte **inst, struct arb_program *Program, GLdouble *scale)
static GLfloat parse_float (const GLubyte **inst, struct arb_program *Program)
static GLfloat parse_signed_float (const GLubyte **inst, struct arb_program *Program)
static GLvoid parse_constant (const GLubyte **inst, GLfloat *values, struct arb_program *Program, GLboolean use)
static GLuint parse_relative_offset (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLint *offset)
static GLuint parse_color_type (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLint *color)
static GLuint parse_generic_attrib_num (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLuint *attrib)
static GLuint parse_output_color_num (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLuint *color)
static GLuint parse_texcoord_num (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLuint *coord)
static GLuint parse_teximage_num (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLuint *coord)
static GLuint parse_weight_num (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLint *coord)
static GLuint parse_clipplane_num (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLint *coord)
static GLuint parse_face_type (const GLubyte **inst)
static GLuint parse_matrix (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLint *matrix, GLint *matrix_idx, GLint *matrix_modifier)
static GLuint parse_state_single_item (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, gl_state_index state_tokens[STATE_LENGTH])
static GLuint parse_program_single_item (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, gl_state_index state_tokens[STATE_LENGTH])
static GLuint generic_attrib_check (struct var_cache *vc_head)
static GLuint parse_attrib_binding (GLcontext *ctx, const GLubyte **inst, struct arb_program *Program, GLuint *inputReg, GLuint *is_generic)
static GLuint parse_result_binding (GLcontext *ctx, const GLubyte **inst, GLuint *outputReg, struct arb_program *Program)
static GLint parse_attrib (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program)
static GLuint parse_param_elements (GLcontext *ctx, const GLubyte **inst, struct var_cache *param_var, struct arb_program *Program, GLboolean use)
static GLuint parse_param (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program)
static GLuint parse_param_use (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program, struct var_cache **new_var)
static GLuint parse_temp (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program)
static GLuint parse_output (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program)
static GLuint parse_alias (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program)
static GLuint parse_address (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program)
static GLint parse_declaration (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program)
static GLuint parse_masked_dst_reg (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program, enum register_file *File, GLuint *Index, GLint *WriteMask)
static GLuint parse_address_reg (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program, GLint *Index)
static void parse_swizzle_mask (const GLubyte **inst, GLubyte *swizzle, GLint len)
static void parse_extended_swizzle_mask (const GLubyte **inst, GLubyte swizzle[4], GLubyte *negateMask)
static GLuint parse_src_reg (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program, enum register_file *File, GLint *Index, GLboolean *IsRelOffset)
static GLuint parse_vector_src_reg (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *program, struct prog_src_register *reg)
static GLuint parse_scalar_src_reg (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *program, struct prog_src_register *reg)
static GLuint parse_dst_reg (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *program, struct prog_dst_register *reg)
static GLuint parse_fp_instruction (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program, struct prog_instruction *fp)
static GLuint parse_vp_address_reg (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program, struct prog_dst_register *reg)
static GLuint parse_vp_instruction (GLcontext *ctx, const GLubyte **inst, struct var_cache **vc_head, struct arb_program *Program, struct prog_instruction *vp)
static GLint parse_instructions (GLcontext *ctx, const GLubyte *inst, struct var_cache **vc_head, struct arb_program *Program)
static int set_reg8 (GLcontext *ctx, grammar id, const char *name, GLubyte value)
static int enable_ext (GLcontext *ctx, grammar id, const char *name)
static GLboolean enable_parser_extensions (GLcontext *ctx, grammar id)
static GLboolean _mesa_parse_arb_program (GLcontext *ctx, GLenum target, const GLubyte *str, GLsizei len, struct arb_program *program)
void _mesa_parse_arb_fragment_program (GLcontext *ctx, GLenum target, const GLvoid *str, GLsizei len, struct gl_fragment_program *program)
void _mesa_parse_arb_vertex_program (GLcontext *ctx, GLenum target, const GLvoid *str, GLsizei len, struct gl_vertex_program *program)

Variables

static LONGSTRING char arb_grammar_text [] = "/srv/doxygen/reactos/dll/3rdparty/mesa32/src/shader/arbprogparse.c" 2
static LONGSTRING char core_grammar_text []

Detailed Description

ARB_*_program parser core

Author:
Karl Rasche

Definition in file arbprogparse.c.


Generated on Sat May 26 2012 04:57:42 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.