3c5b7dca30
using the stride to calculate the buffer map size here is not correct, as the stride is not necessarily equal to the attribute size, it's only the distance between elements. for the case of overlapping elements (cts does this), the result is that the attribute conversion will read past the end of the mapped src region this is usually fine for drivers when they directly map the vertex buffer, as the memory past the requested region is usually made available, but in the case where the readback occurs using a staging resource sized exactly to the map region, this overflows and fails silently, not even triggering a valgrind error because gpu memory lol instead, add the size of the largest possible element, which will automatically be clamped and ensure any staging buffers are correctly sized Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10963>