From: Alyssa Rosenzweig Date: Fri, 11 Aug 2023 13:58:33 +0000 (-0400) Subject: agx: Lower f2u8/f2i8 X-Git-Tag: upstream/23.3.3~3439 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa2a7cb2a8779e70a944bd328edc0813055da255;p=platform%2Fupstream%2Fmesa.git agx: Lower f2u8/f2i8 The less 8-bit we need to emulate in the backend the better. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/asahi/compiler/agx_nir_algebraic.py b/src/asahi/compiler/agx_nir_algebraic.py index 639cba5..9fd4a40 100644 --- a/src/asahi/compiler/agx_nir_algebraic.py +++ b/src/asahi/compiler/agx_nir_algebraic.py @@ -39,6 +39,10 @@ lower_pack = [ (('u2f32', ('u2u32', a)), ('u2f32', a)), (('i2f32', ('i2i32', a)), ('i2f32', a)), + # Chew through some 8-bit before the backend has to deal with it + (('f2u8', a), ('u2u8', ('f2u16', a))), + (('f2i8', a), ('i2i8', ('f2i16', a))), + # These are based on the lowerings from nir_opt_algebraic, but conditioned # on the number of bits not being constant. If the bit count is constant # (the happy path) we can use our native instruction instead.