diff options
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r-- | src/glsl/ir.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index de9613e8fa1..54a8e400c16 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -1603,8 +1603,15 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name, this->depth_layout = ir_depth_layout_none; this->used = false; - if (type && type->base_type == GLSL_TYPE_SAMPLER) - this->read_only = true; + if (type != NULL) { + if (type->base_type == GLSL_TYPE_SAMPLER) + this->read_only = true; + + if (type->is_interface()) + this->init_interface_type(type); + else if (type->is_array() && type->fields.array->is_interface()) + this->init_interface_type(type->fields.array); + } } |