diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2010-10-30 22:29:07 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2010-11-03 13:39:42 -0700 |
commit | 0fd665ca63ba37b9a3022f21a8d9f363530e2038 (patch) | |
tree | aa12eabd7818fd7ff812c42cd21cc83770f9034c | |
parent | d2c23ac82a4038c0f69b6ce5b0c49f763a65df8a (diff) |
ir_reader: Return a specific ir_dereference variant.
There's really no reason to return the base class when we have more
specific information about what type it is.
-rw-r--r-- | src/glsl/ir_reader.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index a9cbf8ea94..99e25855d0 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -64,9 +64,12 @@ static ir_texture *read_texture(_mesa_glsl_parse_state *, s_list *); static ir_dereference *read_dereference(_mesa_glsl_parse_state *, s_expression *); -static ir_dereference *read_var_ref(_mesa_glsl_parse_state *, s_list *); -static ir_dereference *read_array_ref(_mesa_glsl_parse_state *, s_list *); -static ir_dereference *read_record_ref(_mesa_glsl_parse_state *, s_list *); +static ir_dereference_variable * +read_var_ref(_mesa_glsl_parse_state *, s_list *); +static ir_dereference_array * +read_array_ref(_mesa_glsl_parse_state *, s_list *); +static ir_dereference_record * +read_record_ref(_mesa_glsl_parse_state *, s_list *); void _mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions, @@ -930,7 +933,7 @@ read_dereference(_mesa_glsl_parse_state *st, s_expression *expr) return NULL; } -static ir_dereference * +static ir_dereference_variable * read_var_ref(_mesa_glsl_parse_state *st, s_list *list) { void *ctx = st; @@ -953,7 +956,7 @@ read_var_ref(_mesa_glsl_parse_state *st, s_list *list) return new(ctx) ir_dereference_variable(var); } -static ir_dereference * +static ir_dereference_array * read_array_ref(_mesa_glsl_parse_state *st, s_list *list) { void *ctx = st; @@ -974,7 +977,7 @@ read_array_ref(_mesa_glsl_parse_state *st, s_list *list) return new(ctx) ir_dereference_array(subject, idx); } -static ir_dereference * +static ir_dereference_record * read_record_ref(_mesa_glsl_parse_state *st, s_list *list) { void *ctx = st; |