From e5d64ca69c180cd5443d77b6e1b165529e7124b8 Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Thu, 14 Nov 2024 09:47:04 +0100 Subject: [PATCH] bi: Execute nir_opt_algebraic after nir_lower_pack nir_lower_pack can generate split operations, execute algebraic again to handle them. This fix an assert on "dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_float16" and probably others tests. Fixes: 3904cfabd6a ("bi: Use nir_opt_load_store_vectorize") Signed-off-by: Mary Guillemard Reviewed-by: John Anthony Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/compiler/bifrost_compile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index edd5501b997..1a0005042d6 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -4832,6 +4832,10 @@ bi_optimize_nir(nir_shader *nir, unsigned gpu_id, bool is_blend) }); NIR_PASS(progress, nir, nir_lower_pack); + /* nir_lower_pack can generate split operations, execute algebraic again to + * handle them */ + NIR_PASS(progress, nir, nir_opt_algebraic); + /* TODO: Why is 64-bit getting rematerialized? * KHR-GLES31.core.shader_image_load_store.basic-allTargets-atomicFS */ NIR_PASS(progress, nir, nir_lower_int64);