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() */
|
/* Operations for lower_instructions() */
|
||||||
#define LDEXP_TO_ARITH 0x80
|
#define LDEXP_TO_ARITH 0x80
|
||||||
#define CARRY_TO_ARITH 0x100
|
|
||||||
#define BORROW_TO_ARITH 0x200
|
|
||||||
#define DOPS_TO_DFRAC 0x800
|
#define DOPS_TO_DFRAC 0x800
|
||||||
#define DFREXP_DLDEXP_TO_ARITH 0x1000
|
#define DFREXP_DLDEXP_TO_ARITH 0x1000
|
||||||
#define BIT_COUNT_TO_MATH 0x02000
|
#define BIT_COUNT_TO_MATH 0x02000
|
||||||
|
@@ -31,8 +31,6 @@
|
|||||||
*
|
*
|
||||||
* Currently supported transformations:
|
* Currently supported transformations:
|
||||||
* - LDEXP_TO_ARITH
|
* - LDEXP_TO_ARITH
|
||||||
* - CARRY_TO_ARITH
|
|
||||||
* - BORROW_TO_ARITH
|
|
||||||
* - DOPS_TO_DFRAC
|
* - DOPS_TO_DFRAC
|
||||||
*
|
*
|
||||||
* LDEXP_TO_ARITH:
|
* LDEXP_TO_ARITH:
|
||||||
@@ -44,14 +42,6 @@
|
|||||||
* Converts ir_binop_ldexp, ir_unop_frexp_sig, and ir_unop_frexp_exp to
|
* Converts ir_binop_ldexp, ir_unop_frexp_sig, and ir_unop_frexp_exp to
|
||||||
* arithmetic and bit ops for double arguments.
|
* 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:
|
* DOPS_TO_DFRAC:
|
||||||
* --------------
|
* --------------
|
||||||
* Converts double trunc, ceil, floor, round to fract
|
* 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 *
|
ir_expression *
|
||||||
lower_instructions_visitor::_carry(operand a, operand b)
|
lower_instructions_visitor::_carry(operand a, operand b)
|
||||||
{
|
{
|
||||||
if (lowering(CARRY_TO_ARITH))
|
return i2u(b2i(less(add(a, b),
|
||||||
return i2u(b2i(less(add(a, b),
|
a.val->clone(ralloc_parent(a.val), NULL))));
|
||||||
a.val->clone(ralloc_parent(a.val), NULL))));
|
|
||||||
else
|
|
||||||
return carry(a, b);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1449,13 +1436,11 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ir_binop_carry:
|
case ir_binop_carry:
|
||||||
if (lowering(CARRY_TO_ARITH))
|
carry_to_arith(ir);
|
||||||
carry_to_arith(ir);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ir_binop_borrow:
|
case ir_binop_borrow:
|
||||||
if (lowering(BORROW_TO_ARITH))
|
borrow_to_arith(ir);
|
||||||
borrow_to_arith(ir);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ir_unop_trunc:
|
case ir_unop_trunc:
|
||||||
|
@@ -86,8 +86,6 @@ link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||||||
lower_instructions(ir,
|
lower_instructions(ir,
|
||||||
(have_ldexp ? 0 : LDEXP_TO_ARITH) |
|
(have_ldexp ? 0 : LDEXP_TO_ARITH) |
|
||||||
(have_dfrexp ? 0 : DFREXP_DLDEXP_TO_ARITH) |
|
(have_dfrexp ? 0 : DFREXP_DLDEXP_TO_ARITH) |
|
||||||
CARRY_TO_ARITH |
|
|
||||||
BORROW_TO_ARITH |
|
|
||||||
(have_dround ? 0 : DOPS_TO_DFRAC) |
|
(have_dround ? 0 : DOPS_TO_DFRAC) |
|
||||||
(ctx->Const.ForceGLSLAbsSqrt ? SQRT_TO_ABS_SQRT : 0) |
|
(ctx->Const.ForceGLSLAbsSqrt ? SQRT_TO_ABS_SQRT : 0) |
|
||||||
/* Assume that if ARB_gpu_shader5 is not supported
|
/* Assume that if ARB_gpu_shader5 is not supported
|
||||||
|
Reference in New Issue
Block a user