From: Kenneth Graunke Date: Sun, 31 Oct 2010 05:29:07 +0000 (-0700) Subject: ir_reader: Return a specific ir_dereference variant. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0fd665ca63ba37b9a3022f21a8d9f363530e2038;p=mesa.git 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. --- diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index a9cbf8ea944..99e25855d05 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;