summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_builder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/ir_builder.cpp')
-rw-r--r--src/glsl/ir_builder.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
index b2b926b610f..b549ff4f72b 100644
--- a/src/glsl/ir_builder.cpp
+++ b/src/glsl/ir_builder.cpp
@@ -76,6 +76,13 @@ assign(deref lhs, operand rhs, operand condition)
return assign(lhs, rhs, condition, (1 << lhs.val->type->vector_elements) - 1);
}
+ir_return *
+ret(operand retval)
+{
+ void *mem_ctx = ralloc_parent(retval.val);
+ return new(mem_ctx) ir_return(retval.val);
+}
+
ir_swizzle *
swizzle(operand a, int swizzle, int components)
{