glsl: Delete unused EmitNoPow path.
This was last used with i915c, now lower_fpow covers this class of lowering. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15623>
This commit is contained in:
@@ -37,7 +37,6 @@ struct gl_shader_program;
|
||||
#define SUB_TO_ADD_NEG 0x01
|
||||
#define FDIV_TO_MUL_RCP 0x02
|
||||
#define EXP_TO_EXP2 0x04
|
||||
#define POW_TO_EXP2 0x08
|
||||
#define LOG_TO_LOG2 0x10
|
||||
#define MOD_TO_FLOOR 0x20
|
||||
#define INT_DIV_TO_MUL_RCP 0x40
|
||||
|
@@ -34,7 +34,6 @@
|
||||
* - DIV_TO_MUL_RCP
|
||||
* - INT_DIV_TO_MUL_RCP
|
||||
* - EXP_TO_EXP2
|
||||
* - POW_TO_EXP2
|
||||
* - LOG_TO_LOG2
|
||||
* - MOD_TO_FLOOR
|
||||
* - LDEXP_TO_ARITH
|
||||
@@ -75,11 +74,6 @@
|
||||
* do have base 2 versions, so this pass converts exp and log to exp2
|
||||
* and log2 operations.
|
||||
*
|
||||
* POW_TO_EXP2:
|
||||
* -----------
|
||||
* Many older GPUs don't have an x**y instruction. For these GPUs, convert
|
||||
* x**y to 2**(y * log2(x)).
|
||||
*
|
||||
* MOD_TO_FLOOR:
|
||||
* -------------
|
||||
* Breaks an ir_binop_mod expression down to (op0 - op1 * floor(op0 / op1))
|
||||
@@ -146,7 +140,6 @@ private:
|
||||
void int_div_to_mul_rcp(ir_expression *);
|
||||
void mod_to_floor(ir_expression *);
|
||||
void exp_to_exp2(ir_expression *);
|
||||
void pow_to_exp2(ir_expression *);
|
||||
void log_to_log2(ir_expression *);
|
||||
void ldexp_to_arith(ir_expression *);
|
||||
void dldexp_to_arith(ir_expression *);
|
||||
@@ -288,21 +281,6 @@ lower_instructions_visitor::exp_to_exp2(ir_expression *ir)
|
||||
this->progress = true;
|
||||
}
|
||||
|
||||
void
|
||||
lower_instructions_visitor::pow_to_exp2(ir_expression *ir)
|
||||
{
|
||||
ir_expression *const log2_x =
|
||||
new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type,
|
||||
ir->operands[0]);
|
||||
|
||||
ir->operation = ir_unop_exp2;
|
||||
ir->init_num_operands();
|
||||
ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[1]->type,
|
||||
ir->operands[1], log2_x);
|
||||
ir->operands[1] = NULL;
|
||||
this->progress = true;
|
||||
}
|
||||
|
||||
void
|
||||
lower_instructions_visitor::log_to_log2(ir_expression *ir)
|
||||
{
|
||||
@@ -1793,11 +1771,6 @@ lower_instructions_visitor::visit_leave(ir_expression *ir)
|
||||
mod_to_floor(ir);
|
||||
break;
|
||||
|
||||
case ir_binop_pow:
|
||||
if (lowering(POW_TO_EXP2))
|
||||
pow_to_exp2(ir);
|
||||
break;
|
||||
|
||||
case ir_binop_ldexp:
|
||||
if (lowering(LDEXP_TO_ARITH) && ir->type->is_float())
|
||||
ldexp_to_arith(ir);
|
||||
|
@@ -398,7 +398,7 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
|
||||
return op_expr[0]->operands[0];
|
||||
}
|
||||
|
||||
if (!options->EmitNoPow && op_expr[0]->operation == ir_binop_mul) {
|
||||
if (op_expr[0]->operation == ir_binop_mul) {
|
||||
for (int log2_pos = 0; log2_pos < 2; log2_pos++) {
|
||||
ir_expression *log2_expr =
|
||||
op_expr[0]->operands[log2_pos]->as_expression();
|
||||
|
@@ -312,7 +312,6 @@ struct gl_shader_compiler_options
|
||||
GLboolean EmitNoLoops;
|
||||
GLboolean EmitNoCont; /**< Emit CONT opcode? */
|
||||
GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */
|
||||
GLboolean EmitNoPow; /**< Emit POW opcodes? */
|
||||
GLboolean EmitNoSat; /**< Emit SAT opcodes? */
|
||||
GLboolean LowerCombinedClipCullDistance; /** Lower gl_ClipDistance and
|
||||
* gl_CullDistance together from
|
||||
|
@@ -141,7 +141,6 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
CARRY_TO_ARITH |
|
||||
BORROW_TO_ARITH |
|
||||
(have_dround ? 0 : DOPS_TO_DFRAC) |
|
||||
(options->EmitNoPow ? POW_TO_EXP2 : 0) |
|
||||
(!ctx->Const.NativeIntegers ? INT_DIV_TO_MUL_RCP : 0) |
|
||||
(options->EmitNoSat ? SAT_TO_CLAMP : 0) |
|
||||
(ctx->Const.ForceGLSLAbsSqrt ? SQRT_TO_ABS_SQRT : 0) |
|
||||
|
Reference in New Issue
Block a user