From f86ad382c5b86e64e8326c26a06acffaae7e1bd9 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 2 Aug 2022 12:12:22 -0400 Subject: [PATCH] agx: Stop using broken idiv lowering It is, as the name suggests, broken. Instruction count goes from 50->53 on the shader in dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_fragment. I'm happy to eat that cost in exchange for correct results! There are lots more low-hanging opportunities for optimizations to that shader: - fuse double icmpsel for the b2i32(cmp) sequences - promoting big immediates to uniforms - fusing integer multiply+add But for now this is acceptable and anyway I'm doing this on "fix broken NIR lowering" time and not Asahi time. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_compile.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index bc6b7428fb7..0a732788c46 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -1532,7 +1532,6 @@ agx_optimize_nir(nir_shader *nir) bool progress; nir_lower_idiv_options idiv_options = { - .imprecise_32bit_lowering = true, .allow_fp16 = true, };