summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_texture.c
diff options
context:
space:
mode:
authorGurchetan Singh <[email protected]>2019-01-11 17:38:55 -0800
committerGert Wollny <[email protected]>2019-02-15 11:19:04 +0100
commit7626e6e18956cac0de9077694c97a388c739bdd0 (patch)
tree455944983dbb9f90e0b2917eed2193887ef36dbe /src/gallium/drivers/virgl/virgl_texture.c
parentc19aedcf1a83c70a999b963dfbc0bce47a189600 (diff)
virgl: track level cleanliness rather than resource cleanliness
This allows a minor optimization for texture upload. Reviewed-by: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_texture.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_texture.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c
index 59dbd1509c1..9a402056e7a 100644
--- a/src/gallium/drivers/virgl/virgl_texture.c
+++ b/src/gallium/drivers/virgl/virgl_texture.c
@@ -137,7 +137,7 @@ static void *virgl_texture_transfer_map(struct pipe_context *ctx,
trans->resolve_tmp = NULL;
}
- readback = virgl_res_needs_readback(vctx, vtex, usage);
+ readback = virgl_res_needs_readback(vctx, vtex, usage, level);
if (readback)
vs->vws->transfer_get(vs->vws, hw_res, box, trans->base.stride,
trans->l_stride, trans->offset, level);
@@ -165,7 +165,6 @@ static void virgl_texture_transfer_unmap(struct pipe_context *ctx,
if (trans->base.usage & PIPE_TRANSFER_WRITE) {
if (!(transfer->usage & PIPE_TRANSFER_FLUSH_EXPLICIT)) {
struct virgl_screen *vs = virgl_screen(ctx->screen);
- vtex->clean[0] = FALSE;
vctx->num_transfers++;
vs->vws->transfer_put(vs->vws, vtex->hw_res,
&transfer->box, trans->base.stride,