From: Alyssa Rosenzweig Date: Tue, 28 Apr 2020 00:09:43 +0000 (-0400) Subject: pan/mdg: Lower specials to 32-bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=62768590d5414a40e6b22a22a7a50e66893d0451;p=mesa.git pan/mdg: Lower specials to 32-bit Signed-off-by: Alyssa Rosenzweig Part-of: --- 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