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 <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>
This commit is contained in:
Alyssa Rosenzweig
2022-08-02 12:12:22 -04:00
committed by Alyssa Rosenzweig
parent f28c631a89
commit f86ad382c5
-1
View File
@@ -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,
};