summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program_parse.y
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-07-22 10:51:18 -0700
committerIan Romanick <[email protected]>2009-07-22 10:51:18 -0700
commit69d3d19b54c46cb7b0e05c04a5304830a1ee2691 (patch)
tree3bd5ac7fb2d43067897a28ef82f705a02e3d8a7c /src/mesa/shader/program_parse.y
parent770cebbc29863ae944a31463ee4bdeb789105aba (diff)
parser: Anonymous constants come from the PROGRAM_CONSTANT file
Diffstat (limited to 'src/mesa/shader/program_parse.y')
-rw-r--r--src/mesa/shader/program_parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 39e3ee1f1e2..0260196210a 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -590,7 +590,9 @@ srcReg: IDENTIFIER /* temporaryReg | progParamSingle */
| paramSingleItemUse
{
init_src_reg(& $$);
- $$.Base.File = $1.param_binding_type;
+ $$.Base.File = ($1.name != NULL)
+ ? $1.param_binding_type
+ : PROGRAM_CONSTANT;
$$.Base.Index = $1.param_binding_begin;
}
;