mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 02:40:11 +01:00
nir: Add a couple trivial abs optimizations
Spotted in a shader in Batman: Arkham City. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
52d831ff83
commit
e4d346c86d
1 changed files with 2 additions and 0 deletions
|
|
@ -229,6 +229,8 @@ optimizations = [
|
|||
(('imax', a, a), a),
|
||||
(('umin', a, a), a),
|
||||
(('umax', a, a), a),
|
||||
(('fmax', a, ('fneg', a)), ('fabs', a)),
|
||||
(('imax', a, ('ineg', a)), ('iabs', a)),
|
||||
(('fmin', a, ('fneg', a)), ('fneg', ('fabs', a))),
|
||||
(('imin', a, ('ineg', a)), ('ineg', ('iabs', a))),
|
||||
(('fmin', a, ('fneg', ('fabs', a))), ('fneg', ('fabs', a))),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue