virgl: do not use winsys info for guest storage of classic resource
authorYiwei Zhang <zzyiwei@chromium.org>
Tue, 11 May 2021 21:31:19 +0000 (21:31 +0000)
committerMarge Bot <eric+marge@anholt.net>
Tue, 11 May 2021 23:51:42 +0000 (23:51 +0000)
commit47eabd0e6b926535a68a7173eba2ceeb4ed9747e
treed663408cd6538b6fee669db87ea77f6a38a37177
parent494255c82162f3cec8497d7f8a483a90141797c5
virgl: do not use winsys info for guest storage of classic resource

winsys_stride is the stride of the host storage of the classic resource,
and using that breaks the readback on the guest storage.

v2: move the scrubbing to virgl_resource_from_handle
The returned modifier also points directly to the host driver's real
modifier but not a virtualized one. Leave plane_offset as zero here
matches the prior behavior before introducing winsys info.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> (v1)
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10757>
src/gallium/drivers/virgl/virgl_resource.c