glsl: always do {CARRY,BORROW}_TO_ARITH lowering
The only caller always sets these so here we just remove the option to disable it. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19112>
This commit is contained in:

committed by
Marge Bot

parent
9f14c5dae2
commit
e5102a406f
@@ -35,8 +35,6 @@ struct gl_shader_program;
|
||||
|
||||
/* Operations for lower_instructions() */
|
||||
#define LDEXP_TO_ARITH 0x80
|
||||
#define CARRY_TO_ARITH 0x100
|
||||
#define BORROW_TO_ARITH 0x200
|
||||
#define DOPS_TO_DFRAC 0x800
|
||||
#define DFREXP_DLDEXP_TO_ARITH 0x1000
|
||||
#define BIT_COUNT_TO_MATH 0x02000
|
||||
|
@@ -31,8 +31,6 @@
|
||||
*
|
||||
* Currently supported transformations:
|
||||
* - LDEXP_TO_ARITH
|
||||
* - CARRY_TO_ARITH
|
||||
* - BORROW_TO_ARITH
|
||||
* - DOPS_TO_DFRAC
|
||||
*
|
||||
* LDEXP_TO_ARITH:
|
||||
@@ -44,14 +42,6 @@
|
||||
* Converts ir_binop_ldexp, ir_unop_frexp_sig, and ir_unop_frexp_exp to
|
||||
* arithmetic and bit ops for double arguments.
|
||||
*
|
||||
* CARRY_TO_ARITH:
|
||||
* ---------------
|
||||
* Converts ir_carry into (x + y) < x.
|
||||
*
|
||||
* BORROW_TO_ARITH:
|
||||
* ----------------
|
||||
* Converts ir_borrow into (x < y).
|
||||
*
|
||||
* DOPS_TO_DFRAC:
|
||||
* --------------
|
||||
* Converts double trunc, ceil, floor, round to fract
|
||||
@@ -1259,11 +1249,8 @@ lower_instructions_visitor::find_msb_to_float_cast(ir_expression *ir)
|
||||
ir_expression *
|
||||
lower_instructions_visitor::_carry(operand a, operand b)
|
||||
{
|
||||
if (lowering(CARRY_TO_ARITH))
|
||||
return i2u(b2i(less(add(a, b),
|
||||
a.val->clone(ralloc_parent(a.val), NULL))));
|
||||
else
|
||||
return carry(a, b);
|
||||
return i2u(b2i(less(add(a, b),
|
||||
a.val->clone(ralloc_parent(a.val), NULL))));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1449,13 +1436,11 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
|
||||
break;
|
||||
|
||||
case ir_binop_carry:
|
||||
if (lowering(CARRY_TO_ARITH))
|
||||
carry_to_arith(ir);
|
||||
carry_to_arith(ir);
|
||||
break;
|
||||
|
||||
case ir_binop_borrow:
|
||||
if (lowering(BORROW_TO_ARITH))
|
||||
borrow_to_arith(ir);
|
||||
borrow_to_arith(ir);
|
||||
break;
|
||||
|
||||
case ir_unop_trunc:
|
||||
|
Reference in New Issue
Block a user