aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_reader.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-07-22 16:40:35 -0700
committerKenneth Graunke <[email protected]>2010-07-22 16:50:37 -0700
commit3c033637de7def553559c11d037f2e8bbb750f77 (patch)
treeea6da71517f8df1c0fff41702efa9547dbd6f340 /src/glsl/ir_reader.cpp
parentaa9f86ae8b3bb2172092ff9b50751677c509e6b4 (diff)
glsl2: Make ir_assignment derive from ir_instruction, not ir_rvalue.
Assignments can only exist at the top level instruction stream; the residual value is handled by assigning the value to a temporary and returning an ir_dereference_variable of that temporary.
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r--src/glsl/ir_reader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index 2248e926d5d..14bd2d62fd7 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -357,6 +357,8 @@ read_instruction(_mesa_glsl_parse_state *st, s_expression *expr,
ir_instruction *inst = NULL;
if (strcmp(tag->value(), "declare") == 0) {
inst = read_declaration(st, list);
+ } else if (strcmp(tag->value(), "assign") == 0) {
+ inst = read_assignment(st, list);
} else if (strcmp(tag->value(), "if") == 0) {
inst = read_if(st, list, loop_ctx);
} else if (strcmp(tag->value(), "loop") == 0) {
@@ -546,8 +548,6 @@ read_rvalue(_mesa_glsl_parse_state *st, s_expression *expr)
return rvalue;
else if (strcmp(tag->value(), "swiz") == 0) {
rvalue = read_swizzle(st, list);
- } else if (strcmp(tag->value(), "assign") == 0) {
- rvalue = read_assignment(st, list);
} else if (strcmp(tag->value(), "expression") == 0) {
rvalue = read_expression(st, list);
} else if (strcmp(tag->value(), "call") == 0) {