gallium/u_threaded: fix offset calculation for draw_multi slots
authorMax Kellermann <max.kellermann@gmail.com>
Mon, 22 Aug 2022 18:11:18 +0000 (20:11 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 5 Sep 2022 01:16:12 +0000 (21:16 -0400)
commitb830091cb6c0414f3a875d48e5c625101327e02f
tree4e566d5f007aaa67a80dea0afd663ef86d490e93
parent0a0fb7cbc63d66977c148c3f5fd86de8e879f1ab
gallium/u_threaded: fix offset calculation for draw_multi slots

This fixes a buffer corruption bug with glMultiDrawElementsEXT(): the
offset for the source index buffer is reset for each draw_multi slot,
copying only the first `dr` values to each slot's index buffer.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18189>
src/gallium/auxiliary/util/u_threaded_context.c