intel/brw: Use urb_read_length instead of nr_attribute_slots to calculate VS first_non_payload_grf.

Makes sure the number of registers reserved for the payload matches
the size of the URB read, which prevents the VS shared function from
writing past the end of the register file on Xe3 with VRT enabled.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
This commit is contained in:
Francisco Jerez
2025-01-17 14:50:32 -08:00
committed by Marge Bot
parent 7f59708422
commit d2af77aa6b
+1 -1
View File
@@ -20,7 +20,7 @@ brw_assign_vs_urb_setup(fs_visitor &s)
assert(s.stage == MESA_SHADER_VERTEX);
/* Each attribute is 4 regs. */
s.first_non_payload_grf += 4 * vs_prog_data->nr_attribute_slots;
s.first_non_payload_grf += 8 * vs_prog_data->base.urb_read_length;
assert(vs_prog_data->base.urb_read_length <= 15);