diff options
author | Ian Romanick <[email protected]> | 2013-03-15 14:10:12 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-04-08 15:17:05 -0700 |
commit | 46934adb8d855a9505f2231ba3f1ad5449b896a4 (patch) | |
tree | 8b32df284f39e03ab6063d7f1c2c4742e07ae7b1 /src/glsl/ast.h | |
parent | cd39ae73944333690d72c4356ac45675fecef958 (diff) |
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 <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r-- | src/glsl/ast.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 3a61f79d71a..475fb99d08a 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -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); |