mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
nir: Recognize a pattern for doing b2f without the opcode.
Since we have patterns based on b2f, generate them if we see the b2f equivalent using an iand. This is common when generating NIR from TGSI. Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
parent
26261bca21
commit
6e8d4a2f80
1 changed files with 1 additions and 0 deletions
|
|
@ -99,6 +99,7 @@ optimizations = [
|
|||
# Emulating booleans
|
||||
(('fmul', ('b2f', a), ('b2f', b)), ('b2f', ('iand', a, b))),
|
||||
(('fsat', ('fadd', ('b2f', a), ('b2f', b))), ('b2f', ('ior', a, b))),
|
||||
(('iand', 'a@bool', 1.0), ('b2f', a)),
|
||||
# Comparison with the same args. Note that these are not done for
|
||||
# the float versions because NaN always returns false on float
|
||||
# inequalities.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue