mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 10:20:09 +01:00
nir/algebraic: Add some max/min optimizations
Found by inspection. This doesn't help much now but we'll see this
pattern with images if you load UNORM and then store UNORM.
Shader-db results on Kaby Lake:
total instructions in shared programs: 15166916 -> 15166910 (<.01%)
instructions in affected programs: 761 -> 755 (-0.79%)
helped: 6
HURT: 0
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
4dd5263663
commit
d448fa3ae3
1 changed files with 6 additions and 0 deletions
|
|
@ -302,6 +302,12 @@ optimizations = [
|
|||
(('imax', a, a), a),
|
||||
(('umin', a, a), a),
|
||||
(('umax', a, a), a),
|
||||
(('fmax', ('fmax', a, b), b), ('fmax', a, b)),
|
||||
(('umax', ('umax', a, b), b), ('umax', a, b)),
|
||||
(('imax', ('imax', a, b), b), ('imax', a, b)),
|
||||
(('fmin', ('fmin', a, b), b), ('fmin', a, b)),
|
||||
(('umin', ('umin', a, b), b), ('umin', a, b)),
|
||||
(('imin', ('imin', a, b), b), ('imin', a, b)),
|
||||
(('fmax', a, ('fneg', a)), ('fabs', a)),
|
||||
(('imax', a, ('ineg', a)), ('iabs', a)),
|
||||
(('fmin', a, ('fneg', a)), ('fneg', ('fabs', a))),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue