mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 22:20:14 +01:00
glsl/opt_algebraic: Drop log(exp(x)) -> x and exp(log(x)) -> x optimisations.
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:
parent
2bd0343ba0
commit
d79061dba1
1 changed files with 0 additions and 31 deletions
|
|
@ -327,32 +327,10 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
|
|||
}
|
||||
break;
|
||||
|
||||
case ir_unop_exp:
|
||||
if (op_expr[0] == NULL)
|
||||
break;
|
||||
|
||||
if (op_expr[0]->operation == ir_unop_log) {
|
||||
return op_expr[0]->operands[0];
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_unop_log:
|
||||
if (op_expr[0] == NULL)
|
||||
break;
|
||||
|
||||
if (op_expr[0]->operation == ir_unop_exp) {
|
||||
return op_expr[0]->operands[0];
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_unop_exp2:
|
||||
if (op_expr[0] == NULL)
|
||||
break;
|
||||
|
||||
if (op_expr[0]->operation == ir_unop_log2) {
|
||||
return op_expr[0]->operands[0];
|
||||
}
|
||||
|
||||
if (op_expr[0]->operation == ir_binop_mul) {
|
||||
for (int log2_pos = 0; log2_pos < 2; log2_pos++) {
|
||||
ir_expression *log2_expr =
|
||||
|
|
@ -368,15 +346,6 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
|
|||
}
|
||||
break;
|
||||
|
||||
case ir_unop_log2:
|
||||
if (op_expr[0] == NULL)
|
||||
break;
|
||||
|
||||
if (op_expr[0]->operation == ir_unop_exp2) {
|
||||
return op_expr[0]->operands[0];
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_unop_f2i:
|
||||
case ir_unop_f2u:
|
||||
if (op_expr[0] && op_expr[0]->operation == ir_unop_trunc) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue