summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ir_builder.cpp6
-rw-r--r--src/glsl/ir_builder.h8
2 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
index 29cc9bc851f..98ac3c100a1 100644
--- a/src/glsl/ir_builder.cpp
+++ b/src/glsl/ir_builder.cpp
@@ -28,6 +28,12 @@ using namespace ir_builder;
namespace ir_builder {
+void
+ir_factory::emit(ir_instruction *ir)
+{
+ instructions->push_tail(ir);
+}
+
ir_swizzle *
swizzle(operand a, int swizzle, int components)
{
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);