summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_builder.cpp
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-11-10 19:13:54 +1300
committerChris Forbes <[email protected]>2014-07-12 11:20:00 +1200
commit1d5b06664fdd31a9447a1d10ec0615245aa46563 (patch)
treead81df42b513412a254283f18df9c065d10f4e6b /src/glsl/ir_builder.cpp
parent8b7a323596992a2a2127f40d2d4cae1e9fb0a94d (diff)
glsl: add new expression types for interpolateAt*
Will be used to implement interpolateAt*() from ARB_gpu_shader5 Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/glsl/ir_builder.cpp')
-rw-r--r--src/glsl/ir_builder.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
index f4a1c6efa0b..f03941443e0 100644
--- a/src/glsl/ir_builder.cpp
+++ b/src/glsl/ir_builder.cpp
@@ -501,6 +501,24 @@ b2f(operand a)
}
ir_expression *
+interpolate_at_centroid(operand a)
+{
+ return expr(ir_unop_interpolate_at_centroid, a);
+}
+
+ir_expression *
+interpolate_at_offset(operand a, operand b)
+{
+ return expr(ir_binop_interpolate_at_offset, a, b);
+}
+
+ir_expression *
+interpolate_at_sample(operand a, operand b)
+{
+ return expr(ir_binop_interpolate_at_sample, a, b);
+}
+
+ir_expression *
fma(operand a, operand b, operand c)
{
return expr(ir_triop_fma, a, b, c);