diff options
author | Kenneth Graunke <[email protected]> | 2013-09-03 17:02:07 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-09-09 11:52:22 -0700 |
commit | 666df565519357833aabb265e42d1ed981bf2a4a (patch) | |
tree | ce88df2928565e12b9116828e35ec5d3ab03a916 /src/glsl/ir_builder.h | |
parent | 1a6c0efa116e7427e3ee5f24db2000e3edb66047 (diff) |
glsl: Add IR builder shortcuts for a bunch of random opcodes.
Adding new convenience emitters makes it easier to generate IR involving
these opcodes.
bitfield_insert is particularly useful, since there is no expr() for
quadops.
v2: Add fma() and rename lrp() operands to x/y/a to match the GLSL
specification (suggested by Matt Turner). Fix whitespace issues.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ir_builder.h')
-rw-r--r-- | src/glsl/ir_builder.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h index 091cf400b4a..36ae7125871 100644 --- a/src/glsl/ir_builder.h +++ b/src/glsl/ir_builder.h @@ -140,6 +140,14 @@ ir_expression *dotlike(operand a, operand b); ir_expression *clamp(operand a, operand b, operand c); ir_expression *saturate(operand a); ir_expression *abs(operand a); +ir_expression *neg(operand a); +ir_expression *sin(operand a); +ir_expression *cos(operand a); +ir_expression *exp(operand a); +ir_expression *rsq(operand a); +ir_expression *sqrt(operand a); +ir_expression *log(operand a); +ir_expression *sign(operand a); ir_expression *equal(operand a, operand b); ir_expression *nequal(operand a, operand b); @@ -170,6 +178,12 @@ ir_expression *i2u(operand a); ir_expression *u2i(operand a); ir_expression *b2i(operand a); ir_expression *i2b(operand a); +ir_expression *f2b(operand a); +ir_expression *b2f(operand a); + +ir_expression *fma(operand a, operand b, operand c); +ir_expression *lrp(operand x, operand y, operand a); +ir_expression *bitfield_insert(operand a, operand b, operand c, operand d); ir_swizzle *swizzle(operand a, int swizzle, int components); /** |