summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_builder.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-03-19 14:26:04 -0700
committerEric Anholt <eric@anholt.net>2012-04-13 17:01:10 -0700
commitb782352745d322596a9122969f5c0e57ea032c1b (patch)
tree3fa81ca40de5318f7fa4b740b6095852711d3a5d /src/glsl/ir_builder.h
parentd6e6566206029ace72ba037a3ef7950876eeb88b (diff)
downloadexternal_mesa3d-b782352745d322596a9122969f5c0e57ea032c1b.zip
external_mesa3d-b782352745d322596a9122969f5c0e57ea032c1b.tar.gz
external_mesa3d-b782352745d322596a9122969f5c0e57ea032c1b.tar.bz2
glsl: Add common swizzles to ir_builder.
Now we can fold a bunch of our expression setup in ff_fragment_shader into single-line, parseable commits. v2: Make it actually work. I wasn't setting num_components in the mask structure, and not setting up a mask structure is way easier. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/ir_builder.h')
-rw-r--r--src/glsl/ir_builder.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h
index 78b119d..d2c729a 100644
--- a/src/glsl/ir_builder.h
+++ b/src/glsl/ir_builder.h
@@ -57,4 +57,16 @@ ir_expression *mul(operand a, operand b);
ir_expression *dot(operand a, operand b);
ir_expression *saturate(operand a);
+ir_swizzle *swizzle_xxxx(operand a);
+ir_swizzle *swizzle_yyyy(operand a);
+ir_swizzle *swizzle_zzzz(operand a);
+ir_swizzle *swizzle_wwww(operand a);
+ir_swizzle *swizzle_x(operand a);
+ir_swizzle *swizzle_y(operand a);
+ir_swizzle *swizzle_z(operand a);
+ir_swizzle *swizzle_w(operand a);
+ir_swizzle *swizzle_xy(operand a);
+ir_swizzle *swizzle_xyz(operand a);
+ir_swizzle *swizzle_xyzw(operand a);
+
} /* namespace ir_builder */