summaryrefslogtreecommitdiff
path: root/hir_field_selection.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-05-19 11:37:35 +0200
committerIan Romanick <ian.d.romanick@intel.com>2010-05-26 15:23:19 -0700
commit70fe8b66632f4afd87ebb12a450b1e639428e88f (patch)
treea3eae48e0cf4b2ae22a61efd4e825961938137ba /hir_field_selection.cpp
parent461c294ac57e387aa2355cfd2aa93cefaba03baa (diff)
Begin refactoring ir_dereference
Create separate subclasses of ir_dereference for variable, array, and record dereferences. As a side effect, array and record dereferences no longer point to ir_variable objects directly. Instead they each point to an ir_dereference_variable object. This is the first of several steps in the refactoring process. The intention is that ir_dereference will eventually become an abstract base class.
Diffstat (limited to 'hir_field_selection.cpp')
-rw-r--r--hir_field_selection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/hir_field_selection.cpp b/hir_field_selection.cpp
index 685cf75dcf0..f0be84dab4c 100644
--- a/hir_field_selection.cpp
+++ b/hir_field_selection.cpp
@@ -62,7 +62,8 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
expr->primary_expression.identifier);
}
} else if (op->type->base_type == GLSL_TYPE_STRUCT) {
- result = new ir_dereference(op, expr->primary_expression.identifier);
+ result = new ir_dereference_record(op,
+ expr->primary_expression.identifier);
if (result->type->is_error()) {
_mesa_glsl_error(& loc, state, "Cannot access field `%s' of "