virgl: fix readback with pending transfers
authorChia-I Wu <olvaffe@gmail.com>
Tue, 21 May 2019 23:21:27 +0000 (23:21 +0000)
committerChia-I Wu <olvaffe@gmail.com>
Wed, 29 May 2019 16:47:04 +0000 (16:47 +0000)
commit0a0be7aee0dcfa660b62073e39b1e86de67e48fd
tree38486bb97a2e02d40419c4ddb65d4a31ae0e73c0
parent8bdf5a008b3e22f0cd2e836184decfac3265f0df
virgl: fix readback with pending transfers

When readback is true, and there are pending writes in the transfer
queue, we should flush to avoid reading back outdated data.  This
fixes piglit arb_copy_buffer/dlist and a subtest of
arb_copy_buffer/data-sync.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
src/gallium/drivers/virgl/virgl_resource.c