Both apps and we (see virgl_buffer_transfer_flush_region) might flush regions that are unmodified. We have to read back for those flushes. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>tags/19.2-branchpoint
| @@ -56,9 +56,6 @@ bool virgl_res_needs_readback(struct virgl_context *vctx, | |||
| readback = false; | |||
| else if (usage & PIPE_TRANSFER_DISCARD_RANGE) | |||
| readback = false; | |||
| else if ((usage & (PIPE_TRANSFER_WRITE | PIPE_TRANSFER_FLUSH_EXPLICIT)) == | |||
| (PIPE_TRANSFER_WRITE | PIPE_TRANSFER_FLUSH_EXPLICIT)) | |||
| readback = false; | |||
| return readback; | |||
| } | |||