aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program_parse.y
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-09-10 15:33:45 -0700
committerIan Romanick <[email protected]>2009-09-10 15:33:45 -0700
commitb8e1e8d2d8ae6ffbf8f271b46ee89788a926b3b0 (patch)
tree5db502ab80287bfc8ff61082784017c7448464f5 /src/mesa/shader/program_parse.y
parent81722c5d7e8e93d837510b9e6e5d014ec64cf4b3 (diff)
parentd9dc4cb0e4f578da9e50c9d1ba6fd9c22ea2fca6 (diff)
Merge branch 'master' into asm-shader-rework-2
Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_parse.tab.c src/mesa/shader/program_parse.tab.h
Diffstat (limited to 'src/mesa/shader/program_parse.y')
-rw-r--r--src/mesa/shader/program_parse.y17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 3021ae83f36..f70ea92cb05 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -126,7 +126,7 @@ static struct asm_instruction *asm_instruction_copy_ctor(
unsigned attrib;
int integer;
float real;
- unsigned state[5];
+ gl_state_index state[STATE_LENGTH];
int negate;
struct asm_vector vector;
gl_inst_opcode opcode;
@@ -168,9 +168,9 @@ static struct asm_instruction *asm_instruction_copy_ctor(
%token MATERIAL MAT_PROGRAM MATRIX MATRIXINDEX MODELVIEW MVP
%token NORMAL
%token OBJECT
-%token PALETTE PARAMS PLANE POINT POINTSIZE POSITION PRIMARY PROGRAM PROJECTION
+%token PALETTE PARAMS PLANE POINT_TOK POINTSIZE POSITION PRIMARY PROGRAM PROJECTION
%token RANGE RESULT ROW
-%token SCENECOLOR SECONDARY SHININESS SIZE SPECULAR SPOT STATE
+%token SCENECOLOR SECONDARY SHININESS SIZE_TOK SPECULAR SPOT STATE
%token TEXCOORD TEXENV TEXGEN TEXGEN_Q TEXGEN_R TEXGEN_S TEXGEN_T TEXTURE TRANSPOSE
%token TEXTURE_UNIT TEX_1D TEX_2D TEX_3D TEX_CUBE TEX_RECT
%token TEX_SHADOW1D TEX_SHADOW2D TEX_SHADOWRECT
@@ -1546,14 +1546,14 @@ stateClipPlaneNum: INTEGER
}
;
-statePointItem: POINT statePointProperty
+statePointItem: POINT_TOK statePointProperty
{
memset($$, 0, sizeof($$));
$$[0] = $2;
}
;
-statePointProperty: SIZE
+statePointProperty: SIZE_TOK
{
$$ = STATE_POINT_SIZE;
}
@@ -1685,9 +1685,9 @@ stateOptModMatNum:
{
$$ = 0;
}
- | stateModMatNum
+ | '[' stateModMatNum ']'
{
- $$ = $1;
+ $$ = $2;
}
;
stateModMatNum: INTEGER
@@ -2355,8 +2355,7 @@ int add_state_reference(struct gl_program_parameter_list *param_list,
name = _mesa_program_state_string(tokens);
index = _mesa_add_parameter(param_list, PROGRAM_STATE_VAR, name,
- size, GL_NONE,
- NULL, (gl_state_index *) tokens, 0x0);
+ size, GL_NONE, NULL, tokens, 0x0);
param_list->StateFlags |= _mesa_program_state_flags(tokens);
/* free name string here since we duplicated it in add_parameter() */