mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
nir/opt_algebraic: fix frsq clamp pattern
This is not NaN correct. And also make the pattern 32bit only because the constant is hard coded FLT_MAX. Fixes:780b5c1037("nir/algebraic: Simplify some Inf and NaN avoidance code") Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> (cherry picked from commitab773fc5d4) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
This commit is contained in:
parent
4a4a86390b
commit
8f6c3dcc90
2 changed files with 2 additions and 2 deletions
|
|
@ -1754,7 +1754,7 @@
|
|||
"description": "nir/opt_algebraic: fix frsq clamp pattern",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "780b5c10374d9323a6f4933c4cdca3b3beb58f6a",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3910,7 +3910,7 @@ late_optimizations.extend([
|
|||
|
||||
# Putting this in 'optimizations' interferes with the bcsel(a, op(b, c),
|
||||
# op(b, d)) => op(b, bcsel(a, c, d)) transformations. I do not know why.
|
||||
(('bcsel', ('feq', ('fsqrt', 'a(is_not_negative)'), 0.0), intBitsToFloat(0x7f7fffff), ('frsq', a)),
|
||||
(('bcsel@32', ('feq', ('fsqrt', 'a(is_a_number_not_negative)'), 0.0), intBitsToFloat(0x7f7fffff), ('frsq', a)),
|
||||
('fmin', ('frsq', a), intBitsToFloat(0x7f7fffff))),
|
||||
|
||||
# Things that look like DPH in the source shader may get expanded to
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue