From f09f08083584b0210d567a8744bb3e088de6c312 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 23 Mar 2026 15:44:03 -0400 Subject: [PATCH] pan/bi: Vectorize SSBOs when not robust Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Christoph Pillmayer Reviewed-by: Lorenzo Rossi Part-of: --- src/panfrost/ci/panfrost-g610-fails.txt | 1 - src/panfrost/compiler/bifrost/bifrost_compile.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panfrost/ci/panfrost-g610-fails.txt b/src/panfrost/ci/panfrost-g610-fails.txt index 547e1f623cc..1285b3a49bd 100644 --- a/src/panfrost/ci/panfrost-g610-fails.txt +++ b/src/panfrost/ci/panfrost-g610-fails.txt @@ -84,7 +84,6 @@ shaders@point-vertex-id gl_vertexid,Fail shaders@point-vertex-id gl_vertexid gl_instanceid divisor,Fail shaders@point-vertex-id gl_vertexid gl_instanceid,Fail spec@arb_arrays_of_arrays@execution@atomic_counters@fs-indirect-index,Fail -spec@arb_arrays_of_arrays@execution@atomic_counters@fs-simple-inc-dec-read,Fail spec@arb_point_sprite@arb_point_sprite-mipmap,Fail spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgrad,Fail diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index 2f9d3e4d1f0..d5171234a5b 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -5741,6 +5741,11 @@ bi_optimize_nir(nir_shader *nir, unsigned gpu_id, nir_variable_mode robust_modes .callback = mem_vectorize_cb, .robust_modes = robust_modes, }; + + /* Only allow vectorization of SSBOs when no robustness2 is configured */ + if (!(robust_modes & nir_var_mem_ssbo)) + vectorize_opts.modes |= nir_var_mem_ssbo; + NIR_PASS(_, nir, nir_opt_load_store_vectorize, &vectorize_opts); /* nir_lower_pack can generate split operations, execute algebraic again to