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>
This commit is contained in:
@@ -398,6 +398,7 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
|
||||
this->type = glsl_type::uint_type;
|
||||
break;
|
||||
|
||||
case ir_binop_imul_high:
|
||||
case ir_binop_carry:
|
||||
case ir_binop_borrow:
|
||||
case ir_binop_lshift:
|
||||
@@ -529,6 +530,7 @@ static const char *const operator_strs[] = {
|
||||
"+",
|
||||
"-",
|
||||
"*",
|
||||
"imul_high",
|
||||
"/",
|
||||
"carry",
|
||||
"borrow",
|
||||
|
Reference in New Issue
Block a user