From fb7e1fe81cde34e5c10b85fd614a5cde2f299158 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 23 Mar 2026 15:42:04 -0400 Subject: [PATCH] pan/bi: Always vectorize UBO access Now that we claim 16B robustness alignments, we can vectorize UBO access, even when robustness2 is enabled. Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Christoph Pillmayer Reviewed-by: Lorenzo Rossi Part-of: --- src/panfrost/compiler/bifrost/bifrost_compile.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/panfrost/compiler/bifrost/bifrost_compile.c b/src/panfrost/compiler/bifrost/bifrost_compile.c index f828d3b4d60..7784ba6debb 100644 --- a/src/panfrost/compiler/bifrost/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost/bifrost_compile.c @@ -5736,15 +5736,11 @@ bi_optimize_nir(nir_shader *nir, unsigned gpu_id, nir_variable_mode robust2_mode nir_load_store_vectorize_options vectorize_opts = { .modes = nir_var_mem_global | nir_var_mem_shared | + nir_var_mem_ubo | nir_var_shader_temp, .callback = mem_vectorize_cb, .robust_modes = robust2_modes, }; - - /* Only allow vectorization of UBOs when no robustness2 is configured */ - if (!(robust2_modes & nir_var_mem_ubo)) - vectorize_opts.modes |= nir_var_mem_ubo; - NIR_PASS(_, nir, nir_opt_load_store_vectorize, &vectorize_opts); /* nir_lower_pack can generate split operations, execute algebraic again to