summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2019-05-07 13:22:51 -0700
committerChia-I Wu <[email protected]>2019-05-14 17:00:22 +0000
commit76e45534d274ac1664775bb6c394a32859995059 (patch)
tree646c00d36586106f13bef65201d1094ef011447e /src
parent9f8521882a62e9441afb7fbb55329306d50fef8d (diff)
virgl: PIPE_TRANSFER_READ does not imply flush
virgl_res_needs_flush should suffice. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Alexandros Frantzis <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/virgl/virgl_buffer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c
index 42434752d53..d4bde39096e 100644
--- a/src/gallium/drivers/virgl/virgl_buffer.c
+++ b/src/gallium/drivers/virgl/virgl_buffer.c
@@ -43,11 +43,8 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx,
trans = virgl_resource_create_transfer(&vctx->transfer_pool, resource,
&vbuf->metadata, level, usage, box);
- if (usage & PIPE_TRANSFER_READ)
- flush = true;
- else
- flush = virgl_res_needs_flush(vctx, trans);
+ flush = virgl_res_needs_flush(vctx, trans);
if (flush)
ctx->flush(ctx, NULL, 0);