glsl/opt_algebraic: Drop pow-recognizer.
NIR handles pow recognizing, too. No change on freedreno shader-db. Acked-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475>
This commit is contained in:
@@ -327,25 +327,6 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_unop_exp2:
|
||||
if (op_expr[0] == NULL)
|
||||
break;
|
||||
|
||||
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();
|
||||
|
||||
if (log2_expr && log2_expr->operation == ir_unop_log2) {
|
||||
return new(mem_ctx) ir_expression(ir_binop_pow,
|
||||
ir->type,
|
||||
log2_expr->operands[0],
|
||||
op_expr[0]->operands[1 - log2_pos]);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_unop_f2i:
|
||||
case ir_unop_f2u:
|
||||
if (op_expr[0] && op_expr[0]->operation == ir_unop_trunc) {
|
||||
|
||||
Reference in New Issue
Block a user