printf("\n\n");
if (!state.error) {
- printf("(\n");
- foreach_iter(exec_list_iterator, iter, instructions) {
- ir_print_visitor v;
-
- ((ir_instruction *)iter.get())->accept(& v);
- printf("\n");
- }
- printf("\n)");
+ _mesa_print_ir(&instructions, &state);
}
delete state.symbols;
#include "ir_print_visitor.h"
#include "glsl_types.h"
+void
+_mesa_print_ir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state)
+{
+ (void) state;
+
+ printf("(\n");
+ foreach_iter(exec_list_iterator, iter, *instructions) {
+ ir_print_visitor v;
+
+ ((ir_instruction *)iter.get())->accept(& v);
+ printf("\n");
+ }
+ printf("\n)");
+}
+
static void
print_type(const glsl_type *t)
{
#include "ir.h"
#include "ir_visitor.h"
+extern void _mesa_print_ir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
/**
* Abstract base class of visitors of IR instruction trees
*/