summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_builder.h
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2013-09-17 21:34:15 -0700
committerMatt Turner <mattst88@gmail.com>2013-10-07 10:43:19 -0700
commit06e41a02a3564b00404dd3dd5d6f6b5897df36e9 (patch)
treec8addcab70dc2f20e65df76fd2570230ff5e64bd /src/glsl/ir_builder.h
parent69909c866b6595f80d206c8e2484b1dc6668e7be (diff)
downloadexternal_mesa3d-06e41a02a3564b00404dd3dd5d6f6b5897df36e9.zip
external_mesa3d-06e41a02a3564b00404dd3dd5d6f6b5897df36e9.tar.gz
external_mesa3d-06e41a02a3564b00404dd3dd5d6f6b5897df36e9.tar.bz2
glsl: Implement [iu]mulExtended() built-ins for ARB_gpu_shader5.
These built-ins have two "out" parameters, which makes implementing them efficiently with our current compiler infrastructure difficult. Instead, implement them in terms of the existing ir_binop_mul IR (to return the low 32-bits) and a new ir_binop_mul64 which returns the high 32-bits. v2: Rename mul64 -> imul_high as suggested by Ken. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/glsl/ir_builder.h')
-rw-r--r--src/glsl/ir_builder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h
index 1345788..1f07788 100644
--- a/src/glsl/ir_builder.h
+++ b/src/glsl/ir_builder.h
@@ -133,6 +133,7 @@ ir_expression *expr(ir_expression_operation op, operand a, operand b, operand c)
ir_expression *add(operand a, operand b);
ir_expression *sub(operand a, operand b);
ir_expression *mul(operand a, operand b);
+ir_expression *imul_high(operand a, operand b);
ir_expression *div(operand a, operand b);
ir_expression *carry(operand a, operand b);
ir_expression *borrow(operand a, operand b);