aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_print_visitor.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-28 10:22:02 +0000
committermarha <marha@users.sourceforge.net>2011-03-28 10:22:02 +0000
commit0b9b391c5a7acb31e5d8061169649043a38d6d0e (patch)
tree5187c73f0b1abd3cb8fec9706a24251aacecdceb /mesalib/src/glsl/ir_print_visitor.h
parent272e57235cd60a2e65ac8258d96a02eb3939b687 (diff)
downloadvcxsrv-0b9b391c5a7acb31e5d8061169649043a38d6d0e.tar.gz
vcxsrv-0b9b391c5a7acb31e5d8061169649043a38d6d0e.tar.bz2
vcxsrv-0b9b391c5a7acb31e5d8061169649043a38d6d0e.zip
xserver xkeyboard-config mesa git update 28 Mar 2011
Diffstat (limited to 'mesalib/src/glsl/ir_print_visitor.h')
-rw-r--r--mesalib/src/glsl/ir_print_visitor.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/mesalib/src/glsl/ir_print_visitor.h b/mesalib/src/glsl/ir_print_visitor.h
index 4feeb8c18..c7136f11a 100644
--- a/mesalib/src/glsl/ir_print_visitor.h
+++ b/mesalib/src/glsl/ir_print_visitor.h
@@ -29,6 +29,10 @@
#include "ir.h"
#include "ir_visitor.h"
+extern "C" {
+#include "program/symbol_table.h"
+}
+
extern void _mesa_print_ir(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
@@ -37,15 +41,8 @@ extern void _mesa_print_ir(exec_list *instructions,
*/
class ir_print_visitor : public ir_visitor {
public:
- ir_print_visitor()
- {
- indentation = 0;
- }
-
- virtual ~ir_print_visitor()
- {
- /* empty */
- }
+ ir_print_visitor();
+ virtual ~ir_print_visitor();
void indent(void);
@@ -77,6 +74,20 @@ public:
/*@}*/
private:
+ /**
+ * Fetch/generate a unique name for ir_variable.
+ *
+ * GLSL IR permits multiple ir_variables to share the same name. This works
+ * fine until we try to print it, when we really need a unique one.
+ */
+ const char *unique_name(ir_variable *var);
+
+ /** A mapping from ir_variable * -> unique printable names. */
+ hash_table *printable_names;
+ _mesa_symbol_table *symbols;
+
+ void *mem_ctx;
+
int indentation;
};