diff options
Diffstat (limited to 'ir.cpp')
-rw-r--r-- | ir.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -200,18 +200,14 @@ ir_dereference::is_lvalue() if (var == NULL) return false; - /* 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) { ir_variable *const as_var = var->as_variable(); if (as_var == NULL) return false; + if (as_var->type->is_array() && !as_var->array_lvalue) + return false; + return !as_var->read_only; } else if (mode == ir_reference_array) { /* FINISHME: Walk up the dereference chain and figure out if |