brw: Set a valid varying_to_slot for VUE header fields other than PSIZ

This lets us look up things in varying_to_slot[] without having to
special case VIEWPORT, LAYER, and PRIMITIVE_SHADING_RATE.  All of them
map to the same slot as PSIZ, slot 0, the VUE header.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
This commit is contained in:
Kenneth Graunke 2026-01-29 10:48:11 -08:00 committed by Marge Bot
parent 076a183b8f
commit 54def4020c

View file

@ -273,6 +273,11 @@ brw_compute_vue_map(const struct intel_device_info *devinfo,
}
}
assert(vue_map->varying_to_slot[VARYING_SLOT_PSIZ] == 0);
vue_map->varying_to_slot[VARYING_SLOT_PRIMITIVE_SHADING_RATE] = 0;
vue_map->varying_to_slot[VARYING_SLOT_LAYER] = 0;
vue_map->varying_to_slot[VARYING_SLOT_VIEWPORT] = 0;
vue_map->num_slots = slot;
vue_map->num_pos_slots = pos_slots;
vue_map->num_per_vertex_slots = 0;