From a9b6a54a8cce0aab44c81ea4821ee564b939ea51 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 14 Feb 2025 17:09:14 +0200 Subject: [PATCH] brw: fix component packing starting index Signed-off-by: Lionel Landwerlin Fixes: 6845dede59 ("brw: add support for no VF input slot compaction") Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_compile_vs.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_compile_vs.cpp b/src/intel/compiler/brw_compile_vs.cpp index 814dd012df0..cd7d3b93348 100644 --- a/src/intel/compiler/brw_compile_vs.cpp +++ b/src/intel/compiler/brw_compile_vs.cpp @@ -162,9 +162,11 @@ brw_nir_pack_vs_input(nir_shader *nir, struct brw_vs_prog_data *prog_data) } } - /* Generate the packing array */ + /* Generate the packing array, we start from the first application + * attribute : VERT_ATTRIB_GENERIC0 + */ unsigned vf_element_count = 0; - for (unsigned a = 0; a < ARRAY_SIZE(attributes) && vf_element_count < 32; a++) { + for (unsigned a = VERT_ATTRIB_GENERIC0; a < ARRAY_SIZE(attributes) && vf_element_count < 32; a++) { /* Consider all attributes used when no slot compaction is active */ if (!attributes[a].is_used && !prog_data->no_vf_slot_compaction) continue;