glsl: Allow dereferencing fields of an interface instance

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Ian Romanick 2013-01-21 23:19:25 -05:00
parent 32f3229255
commit f09d77b2af
1 changed files with 2 additions and 1 deletions

View 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);