aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_texture.c
diff options
context:
space:
mode:
authorGurchetan Singh <[email protected]>2019-03-13 22:58:22 +0000
committerGurchetan Singh <[email protected]>2019-03-13 22:58:22 +0000
commitd6dc68e7b5b6f76a55037f6995dad101cc089d02 (patch)
tree9da41c73d685f8717d26ede50df3b816da256590 /src/gallium/drivers/virgl/virgl_texture.c
parent56717e13a65007a641ede756ea0b26a333dbc72b (diff)
virgl: use uint16_t mask instead of separate booleans
This should save some space. Suggested-by: Erik Faye-Lund <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_texture.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_texture.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c
index c661ca91752..231319899e0 100644
--- a/src/gallium/drivers/virgl/virgl_texture.c
+++ b/src/gallium/drivers/virgl/virgl_texture.c
@@ -108,13 +108,13 @@ static void *virgl_texture_transfer_map(struct pipe_context *ctx,
void *ptr;
boolean readback = TRUE;
struct virgl_hw_res *hw_res;
- bool doflushwait;
+ bool flush;
trans = virgl_resource_create_transfer(&vctx->transfer_pool, resource,
&vtex->metadata, level, usage, box);
- doflushwait = virgl_res_needs_flush_wait(vctx, trans);
- if (doflushwait)
+ flush = virgl_res_needs_flush(vctx, trans);
+ if (flush)
ctx->flush(ctx, NULL, 0);
if (resource->nr_samples > 1) {
@@ -138,12 +138,12 @@ static void *virgl_texture_transfer_map(struct pipe_context *ctx,
}
readback = virgl_res_needs_readback(vctx, vtex, usage, level);
- if (readback)
+ if (readback) {
vs->vws->transfer_get(vs->vws, hw_res, box, trans->base.stride,
trans->l_stride, trans->offset, level);
- if (doflushwait || readback)
vs->vws->resource_wait(vs->vws, vtex->hw_res);
+ }
ptr = vs->vws->resource_map(vs->vws, hw_res);
if (!ptr) {