From: Ian Romanick Date: Sat, 3 Apr 2010 00:05:59 +0000 (-0700) Subject: Whole structures are assignable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d946634eb3761dbec5aa8806fc36ff6d65b4f9c;p=mesa.git 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. --- diff --git a/ir.cpp b/ir.cpp index dd426df566a..ef93c406198 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) {