summaryrefslogtreecommitdiff
path: root/ir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-04-02 17:05:59 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-02 17:06:57 -0700
commit2d946634eb3761dbec5aa8806fc36ff6d65b4f9c (patch)
treebbfb8e54d74375151d985b63d45358f56e13d7d4 /ir.cpp
parentcb9cba20a0923573d61a6360e45a7daac93a982b (diff)
Whole structures are assignable
Whole arrays are assignable in GLSL 1.20 and later, but it's not clear how to handle that within the IR because the IR is supposed to be shading language version agnostic.
Diffstat (limited to 'ir.cpp')
-rw-r--r--ir.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/ir.cpp b/ir.cpp
index dd426df566..ef93c40619 100644
--- a/ir.cpp
+++ b/ir.cpp
@@ -200,8 +200,11 @@ ir_dereference::is_lvalue()
if (var == NULL)
return false;
- if (this->type->base_type == GLSL_TYPE_ARRAY ||
- this->type->base_type == GLSL_TYPE_STRUCT)
+ /* Arrays are not assignable in GLSL 1.10, but in GLSL 1.20 and later they
+ * are.
+ */
+ /* FINISHME: Handle GLSL 1.10 vs 1.20 differences. */
+ if (this->type->base_type == GLSL_TYPE_ARRAY)
return false;
if (mode == ir_reference_variable) {