glsl: Refactor handling of ast_array_index to a separate function
I love 800+ line switch-statements as much as the next guy... Future commits will make changes to this part of the AST-to-HIR conversion, and extracting this code will make that a bit easier. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -854,6 +854,13 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
|
||||
exec_list *instructions,
|
||||
struct _mesa_glsl_parse_state *state);
|
||||
|
||||
extern ir_rvalue *
|
||||
_mesa_ast_array_index_to_hir(void *mem_ctx,
|
||||
struct _mesa_glsl_parse_state *state,
|
||||
ir_rvalue *array, ir_rvalue *idx,
|
||||
YYLTYPE &loc, YYLTYPE &idx_loc,
|
||||
bool error_emitted);
|
||||
|
||||
void
|
||||
emit_function(_mesa_glsl_parse_state *state, ir_function *f);
|
||||
|
||||
|
Reference in New Issue
Block a user