};
+extern void
+_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state);
+
extern struct ir_instruction *
_mesa_ast_field_selection_to_hir(const struct ast_expression *expr,
exec_list *instructions,
#include "glsl_types.h"
#include "ir.h"
+void
+_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
+{
+ struct simple_node *ptr;
+
+ foreach (ptr, & state->translation_unit) {
+ ((ast_node *)ptr)->hir(instructions, state);
+ }
+}
+
+
static const struct glsl_type *
arithmetic_result_type(const struct glsl_type *type_a,
const struct glsl_type *type_b,
((ast_node *)ptr)->print();
}
- foreach (ptr, & state.translation_unit) {
- ((ast_node *)ptr)->hir(&instructions, &state);
- }
+ _mesa_ast_to_hir(&instructions, &state);
printf("\n\n");
foreach_iter(exec_list_iterator, iter, instructions) {