aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-12-27 16:09:19 +1000
committerDave Airlie <[email protected]>2018-12-28 16:50:38 +1000
commitd1ce7eba8b056bfd7d8f29cc0f583777a7ee30e5 (patch)
tree0a046e279e3284209fcfc9aa9adbd5e34745998c
parent6adbd9ac7434f7c1824821075034ee774b5d36ae (diff)
virgl/vtest: fix front buffer flush with protocol version 0.
Older versions of virglrenderer before 33da7361aec486290df0aec4ad8dfa8ff6adde2c in vtest mode, misrender gears. Fixes: 9d81cd8e7c (virgl: Pass resource size and transfer offsets) Reviewed-By: Gert Wollny <[email protected]>
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index 65963ad50e1..5422b29e55a 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -644,7 +644,7 @@ static void virgl_vtest_flush_frontbuffer(struct virgl_winsys *vws,
* get the data. */
virgl_vtest_recv_transfer_get_data(vtws, map + offset, size, valid_stride,
&box, res->format,
- util_format_get_stride(res->format, res->width));
+ vtws->protocol_version == 0 ? valid_stride : util_format_get_stride(res->format, res->width));
vtws->sws->displaytarget_unmap(vtws->sws, res->dt);