brw: fix component packing starting index

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6845dede59 ("brw: add support for no VF input slot compaction")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33553>
This commit is contained in:
Lionel Landwerlin 2025-02-14 17:09:14 +02:00 committed by Marge Bot
parent 94093f58fb
commit a9b6a54a8c

View file

@ -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;