Module: Mesa
Branch: master
Commit: 08ab7cecd98ca5e128ed3bfc7cc38b0a24b37181
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=08ab7cecd98ca5e128ed3bfc7cc38b0a24b37181

Author: Alyssa Rosenzweig <alyssa.rosenzw...@collabora.com>
Date:   Tue Mar 10 08:33:11 2020 -0400

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.rosenzw...@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>

---

 src/panfrost/bifrost/bifrost_nir_algebraic.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/panfrost/bifrost/bifrost_nir_algebraic.py 
b/src/panfrost/bifrost/bifrost_nir_algebraic.py
index fd31bdca9e7..1fb49b1c690 100644
--- a/src/panfrost/bifrost/bifrost_nir_algebraic.py
+++ b/src/panfrost/bifrost/bifrost_nir_algebraic.py
@@ -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

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to