mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 16:50:10 +01:00
nir: Port a floor->truncate algebraic opt pattern from GLSL.
Prevents regression when dropping code from the GLSL optimizer. 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
6229d34b91
commit
6d52e6fd2c
1 changed files with 2 additions and 0 deletions
|
|
@ -129,6 +129,8 @@ optimizations = [
|
|||
'!options->lower_bitops'),
|
||||
(('irem', a, '#b(is_neg_power_of_two)'), ('irem', a, ('iabs', b)), '!options->lower_bitops'),
|
||||
|
||||
(('~fmul', ('fsign', a), ('ffloor', ('fadd', ('fabs', a), 0.5))), ('ftrunc', ('fadd', a, ('fmul', ('fsign', a), 0.5))), '!options->lower_ftrunc || options->lower_ffloor'),
|
||||
|
||||
(('~fneg', ('fneg', a)), a),
|
||||
(('ineg', ('ineg', a)), a),
|
||||
(('fabs', ('fneg', a)), ('fabs', a)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue