Mesa (master): bifrost: Lower x->bool conversions to != 0

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 27 17:09:32 UTC 2020


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

Author: Chris Forbes <chrisforbes at google.com>
Date:   Sat Jul 25 20:11:11 2020 -0700

bifrost: Lower x->bool conversions to != 0

Signed-off-by: Chris Forbes <chrisforbes at google.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6079>

---

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

diff --git a/src/panfrost/bifrost/bifrost_nir_algebraic.py b/src/panfrost/bifrost/bifrost_nir_algebraic.py
index 5e2c65c68ac..d28c82d401a 100644
--- a/src/panfrost/bifrost/bifrost_nir_algebraic.py
+++ b/src/panfrost/bifrost/bifrost_nir_algebraic.py
@@ -86,6 +86,9 @@ SPECIAL = ['fexp2', 'flog2', 'fsin', 'fcos']
 for op in SPECIAL:
         converts += [((op + '@16', a), ('f2f16', (op, ('f2f32', a))))]
 
+converts += [(('f2b32', a), ('fne32', a, 0.0)),
+             (('i2b32', a), ('ine32', a, 0))]
+
 def main():
     parser = argparse.ArgumentParser()
     parser.add_argument('-p', '--import-path', required=True)



More information about the mesa-commit mailing list