diff options
author | Erik Faye-Lund <[email protected]> | 2019-04-05 08:27:14 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-04-17 07:27:08 +0000 |
commit | 9e9d9b352e7a87f42f4fb9117faaf8a350953a0c (patch) | |
tree | 3a67a678e5bda9457298a811b21114b5ccb634c2 /src/gallium | |
parent | fba03322a2977600ea5cd8ca0ca47aced6abf124 (diff) |
virgl: only blit if resource is read
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_texture.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c index 5cb01cb18a0..471fe6c7b9a 100644 --- a/src/gallium/drivers/virgl/virgl_texture.c +++ b/src/gallium/drivers/virgl/virgl_texture.c @@ -178,8 +178,11 @@ static void *texture_transfer_map_resolve(struct pipe_context *ctx, struct pipe_box dst_box = *box; dst_box.x = dst_box.y = dst_box.z = 0; - virgl_copy_region_with_blit(ctx, resolve_tmp, 0, &dst_box, resource, level, box); - ctx->flush(ctx, NULL, 0); + if (usage & PIPE_TRANSFER_READ) { + virgl_copy_region_with_blit(ctx, resolve_tmp, 0, &dst_box, resource, + level, box); + ctx->flush(ctx, NULL, 0); + } void *ptr = texture_transfer_map_plain(ctx, resolve_tmp, 0, usage, &dst_box, &trans->resolve_transfer); |