summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program_parse.y
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2009-09-06 13:15:04 +0200
committerNicolai Hähnle <[email protected]>2009-09-06 13:15:04 +0200
commitf02f63997ce65530788a6dfcb28f11790a14d938 (patch)
treefc6aedb5256bfb84eb170cb82addd2b6605510f8 /src/mesa/shader/program_parse.y
parente95e76e1255a3ad0ce604271301d090337b2e82b (diff)
parent9778731732b4753e79a1b786c65325a52392411d (diff)
Merge branch 'master' into r300-compiler
Conflicts: src/gallium/drivers/r300/r300_tgsi_to_rc.c
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 e2e83e484f5..06c1915fbee 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -117,7 +117,7 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op,
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;
@@ -159,9 +159,9 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op,
%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
@@ -1353,14 +1353,14 @@ stateClipPlaneNum: INTEGER
}
;
-statePointItem: POINT statePointProperty
+statePointItem: POINT_TOK statePointProperty
{
memset($$, 0, sizeof($$));
$$[0] = $2;
}
;
-statePointProperty: SIZE
+statePointProperty: SIZE_TOK
{
$$ = STATE_POINT_SIZE;
}
@@ -1492,9 +1492,9 @@ stateOptModMatNum:
{
$$ = 0;
}
- | stateModMatNum
+ | '[' stateModMatNum ']'
{
- $$ = $1;
+ $$ = $2;
}
;
stateModMatNum: INTEGER
@@ -2077,8 +2077,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() */