summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_builder.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-03-19 16:01:52 -0700
committerEric Anholt <[email protected]>2012-04-13 17:01:14 -0700
commit7e88f8ce8f9d72bbda248554e0630b4aca7e1154 (patch)
treeb5826b0f173c1df998b0eb077392d9bad56f0ccf /src/glsl/ir_builder.h
parentb782352745d322596a9122969f5c0e57ea032c1b (diff)
glsl: Make a little tracking class for emitting IR lists.
This lets us significantly shorten p->instructions->push_tail(ir), and will be used in a few more places. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir_builder.h')
-rw-r--r--src/glsl/ir_builder.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h
index d2c729abdbc..350f9a33a81 100644
--- a/src/glsl/ir_builder.h
+++ b/src/glsl/ir_builder.h
@@ -50,6 +50,14 @@ public:
ir_rvalue *val;
};
+class ir_factory {
+public:
+ void emit(ir_instruction *ir);
+
+ exec_list *instructions;
+ void *mem_ctx;
+};
+
ir_expression *expr(ir_expression_operation op, operand a, operand b);
ir_expression *add(operand a, operand b);
ir_expression *sub(operand a, operand b);