projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a168c9
)
bifrost: Add lowering for b2i32
author
Chris Forbes
<chrisforbes@google.com>
Sun, 26 Jul 2020 17:43:33 +0000
(10:43 -0700)
committer
Marge Bot
<eric+marge@anholt.net>
Mon, 27 Jul 2020 16:53:52 +0000
(16:53 +0000)
Since the bool representation is 0/~0, we can convert to int
just by &1.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6079>
src/panfrost/bifrost/bifrost_nir_algebraic.py
patch
|
blob
|
history
diff --git
a/src/panfrost/bifrost/bifrost_nir_algebraic.py
b/src/panfrost/bifrost/bifrost_nir_algebraic.py
index d28c82d401ab41555f74c9890501baf50fa9c11a..6f3f6eee1a901fe5a214322ac2b9549f973267ed 100644
(file)
--- a/
src/panfrost/bifrost/bifrost_nir_algebraic.py
+++ b/
src/panfrost/bifrost/bifrost_nir_algebraic.py
@@
-87,7
+87,8
@@
for op in SPECIAL:
converts += [((op + '@16', a), ('f2f16', (op, ('f2f32', a))))]
converts += [(('f2b32', a), ('fne32', a, 0.0)),
- (('i2b32', a), ('ine32', a, 0))]
+ (('i2b32', a), ('ine32', a, 0)),
+ (('b2i32', a), ('iand', 'a@32', 1))]
def main():
parser = argparse.ArgumentParser()