pan/bi: Run nir_lower_bit_size after algebraic

nir_opt_algebraic can possibly materialize instructions with a bit_size that
need to be lowerd.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
This commit is contained in:
Mary Guillemard
2025-03-04 10:12:39 +01:00
committed by Marge Bot
parent 0da8a6bfd5
commit 54ce78c4e1
+3
View File
@@ -5152,6 +5152,9 @@ bi_optimize_nir(nir_shader *nir, unsigned gpu_id, bool is_blend)
* KHR-GLES31.core.shader_image_load_store.basic-allTargets-atomicFS */
NIR_PASS(progress, nir, nir_lower_int64);
/* Algebraic can materialize instructions with a bit_size that we need to lower */
NIR_PASS(progress, nir, nir_lower_bit_size, bi_lower_bit_size, &gpu_id);
/* We need to cleanup after each iteration of late algebraic
* optimizations, since otherwise NIR can produce weird edge cases
* (like fneg of a constant) which we don't handle */