summaryrefslogtreecommitdiff
path: root/ir_print_visitor.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-04-28 13:04:15 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-28 18:22:54 -0700
commit36d8a64a95354d09685e65c5e721038ff81b6d1f (patch)
tree5185fd20ac85a5d93b578d93448f13ab8cf0f0e8 /ir_print_visitor.cpp
parent7d82c765a8ac7bdbad4cb445b1d2fd216a6e744d (diff)
IR print visitor: Move logic for printing the whole program to _mesa_print_ir
Diffstat (limited to 'ir_print_visitor.cpp')
-rw-r--r--ir_print_visitor.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/ir_print_visitor.cpp b/ir_print_visitor.cpp
index f1108c6fe4..272e892a1e 100644
--- a/ir_print_visitor.cpp
+++ b/ir_print_visitor.cpp
@@ -24,6 +24,22 @@
#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)
{