[Mesa-dev] [PATCH 31/32] glsl: Allow dereferencing fields of an interface instance

Ian Romanick idr at freedesktop.org
Tue Jan 22 00:52:22 PST 2013


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/glsl/hir_field_selection.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/glsl/hir_field_selection.cpp b/src/glsl/hir_field_selection.cpp
index ac416d5..0035a5f 100644
--- a/src/glsl/hir_field_selection.cpp
+++ b/src/glsl/hir_field_selection.cpp
@@ -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);
 
-- 
1.7.11.7



More information about the mesa-dev mailing list