glsl: Allow dereferencing fields of an interface instance
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 22 Jan 2013 04:19:25 +0000 (23:19 -0500)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 25 Jan 2013 14:07:36 +0000 (09:07 -0500)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/glsl/hir_field_selection.cpp

index ac416d5dac464d8562e13120721913d9f681329e..0035a5f81fd972aec13c75aecdce70ca4f11054d 100644 (file)
@@ -61,7 +61,8 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
         _mesa_glsl_error(& loc, state, "Invalid swizzle / mask `%s'",
                          expr->primary_expression.identifier);
       }
-   } else if (op->type->base_type == GLSL_TYPE_STRUCT) {
+   } else if (op->type->base_type == GLSL_TYPE_STRUCT
+              || op->type->base_type == GLSL_TYPE_INTERFACE) {
       result = new(ctx) ir_dereference_record(op,
                                              expr->primary_expression.identifier);