diff options
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_buffer.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c index 7081c090814..fd00b1748c4 100644 --- a/src/gallium/drivers/virgl/virgl_buffer.c +++ b/src/gallium/drivers/virgl/virgl_buffer.c @@ -53,12 +53,12 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx, ctx->flush(ctx, NULL, 0); readback = virgl_res_needs_readback(vctx, vbuf, usage, 0); - if (readback) { + if (readback) vs->vws->transfer_get(vs->vws, vbuf->hw_res, box, trans->base.stride, trans->l_stride, trans->offset, level); + if (readback || flush) vs->vws->resource_wait(vs->vws, vbuf->hw_res); - } ptr = vs->vws->resource_map(vs->vws, vbuf->hw_res); if (!ptr) { |