summaryrefslogtreecommitdiff
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2011-01-07 18:34:58 -0800
committerIan Romanick <ian.d.romanick@intel.com>2011-01-12 14:30:31 -0800
commitbd33055ef4b6dd18d6247ff7d9e47496ff4acc51 (patch)
tree3278235f89711604cd0f9349ab8ea9270bbd1baa /src/glsl/ir.cpp
parentc3f000b3926988124a44ce7e8cd6588e46063058 (diff)
glsl: Track variable usage, use that to enforce semantics
In particular, variables cannot be redeclared invariant after being used. Fixes piglit test invariant-05.vert and bugzilla #29164. NOTE: This is a candidate for the 7.9 and 7.10 branches.
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 742dd41b9f..460d43b02e 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -1325,6 +1325,7 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
this->constant_value = NULL;
this->origin_upper_left = false;
this->pixel_center_integer = false;
+ this->used = false;
if (type && type->base_type == GLSL_TYPE_SAMPLER)
this->read_only = true;