summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-27 20:09:43 -0400
committerMarge Bot <[email protected]>2020-04-29 15:35:54 +0000
commit62768590d5414a40e6b22a22a7a50e66893d0451 (patch)
tree765664a42c1325b944aa96e8d58f22b5cd6d26ec /src
parentbb0e85fca472ed57bd01ba13a18f55bce42ab73a (diff)
pan/mdg: Lower specials to 32-bit
Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/midgard/midgard_nir_algebraic.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_nir_algebraic.py b/src/panfrost/midgard/midgard_nir_algebraic.py
index 2ba9f226d22..3dc1900cca1 100644
--- a/src/panfrost/midgard/midgard_nir_algebraic.py
+++ b/src/panfrost/midgard/midgard_nir_algebraic.py
@@ -83,6 +83,12 @@ for op in ('u2u', 'i2i', 'f2f', 'i2f', 'u2f', 'f2i', 'f2u'):
srcsz *= 2
dstsz *= 2
+# Midgard outputs fp32 for specials. The f2f32 will be folded in later.
+SPECIAL = ['fexp2', 'flog2', 'fsin', 'fcos', 'frcp', 'frsq']
+
+for op in SPECIAL:
+ converts += [((op + '@16', a), ('f2f16', (op, ('f2f32', a))))]
+
# Midgard scales fsin/fcos arguments by pi.
# Pass must be run only once, after the main loop