aux/tc: handle stride mismatch during rp-optimized subdata
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 23 Aug 2023 15:05:42 +0000 (11:05 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Sep 2023 01:37:22 +0000 (01:37 +0000)
commit51ad269198e425fae719a37f169b365a8b52e7f3
tree3fc0e48ed07858ced17abbb0a1f80a7bd2826760
parent3ecc5f01801d14634dd80c5e18fe9d43600f2e51
aux/tc: handle stride mismatch during rp-optimized subdata

to avoid splitting renderpasses, this subdata optimization handles the usual
driver dance of staging buffer -> gpu copy

if the pbo stride doesn't match the image format's stride, however, then
a direct copy will yield broken pixels and the image will misrender. to avoid this,
detect stride mismatch and translate the single subdata call into a sequence
of non-overlapping subdata calls that the driver can magically figure out
while continuing to not split renderpasses

fixes #9589

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24849>
src/gallium/auxiliary/util/u_threaded_context.c