mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 06:20:19 +01:00
pan/bi: Lower b2f to bcsel
Since we can get a zero for free and a one inlined into the constant, the obvious turns out to be efficient (while allowing flexibility for boolean size). Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>
This commit is contained in:
parent
d3823551b4
commit
08ab7cecd9
1 changed files with 2 additions and 0 deletions
|
|
@ -38,6 +38,8 @@ algebraic_late = [
|
|||
(('ineg', a), ('isub', 0, a)),
|
||||
]
|
||||
|
||||
for sz in ('16', '32', '64'):
|
||||
algebraic_late += [(('b2f' + sz, 'a@1'), ('bcsel', a, 1.0, 0.0))]
|
||||
|
||||
# Midgard is able to type convert down by only one "step" per instruction; if
|
||||
# NIR wants more than one step, we need to break up into multiple instructions
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue