summaryrefslogtreecommitdiff
path: root/ir_to_mesa.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-03 17:26:14 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 15:05:19 -0700
commitb7abce770fe9bb09a6f435d35c1a4afd134fa855 (patch)
tree73d2e6e46f15c3a18d42da1cdb489912299d1825 /ir_to_mesa.h
parent34195832669f0eb7c4a80997cc524f8d10319307 (diff)
ir_to_mesa: Print out the ir along with the Mesa IR.
Ideally this would be hooked up by ir_print_visitor dumping into a string that we could include as prog_instruction->Comment when in debug mode, and not try keeping ir_instruction trees around after conversion to Mesa. The ir_print_visitor isn't set up to do that for us today.
Diffstat (limited to 'ir_to_mesa.h')
-rw-r--r--ir_to_mesa.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ir_to_mesa.h b/ir_to_mesa.h
index e4c6940a33..d9482264d4 100644
--- a/ir_to_mesa.h
+++ b/ir_to_mesa.h
@@ -54,6 +54,8 @@ public:
enum prog_opcode op;
ir_to_mesa_dst_reg dst_reg;
ir_to_mesa_src_reg src_reg[3];
+ /** Pointer to the ir source this tree came from for debugging */
+ ir_instruction *ir;
};
struct mbtree {
@@ -63,6 +65,9 @@ struct mbtree {
uint16_t op;
class ir_to_mesa_visitor *v;
+ /** Pointer to the ir source this tree came from for debugging */
+ ir_instruction *ir;
+
/**
* This is the representation of this tree node's results as a
* source register for its consumer.
@@ -102,6 +107,7 @@ public:
void get_temp_for_var(ir_variable *var, struct mbtree *tree);
struct mbtree *create_tree(int op,
+ ir_instruction *ir,
struct mbtree *left,
struct mbtree *right);