aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_buffer.c
diff options
context:
space:
mode:
authorGurchetan Singh <[email protected]>2019-02-08 18:07:37 -0800
committerGert Wollny <[email protected]>2019-02-15 11:19:05 +0100
commitab6ea6e9cee07dea561426d86f93eff670a53efd (patch)
tree600d19bc63d2bbdd4529ef73a134dab22a8fa765 /src/gallium/drivers/virgl/virgl_buffer.c
parentd98fbd9c92e1567c3c5d7084ce7d4d2c4b53ce51 (diff)
virgl: pass virgl transfer to virgl_res_needs_flush_wait
Reviewed-by: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_buffer.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_buffer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c
index e46c9f504fd..269a451ac18 100644
--- a/src/gallium/drivers/virgl/virgl_buffer.c
+++ b/src/gallium/drivers/virgl/virgl_buffer.c
@@ -42,17 +42,16 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx,
bool readback;
bool doflushwait = false;
+ trans = virgl_resource_create_transfer(&vctx->transfer_pool, resource,
+ &vbuf->metadata, level, usage, box);
if (usage & PIPE_TRANSFER_READ)
doflushwait = true;
else
- doflushwait = virgl_res_needs_flush_wait(vctx, vbuf, usage);
+ doflushwait = virgl_res_needs_flush_wait(vctx, trans);
if (doflushwait)
ctx->flush(ctx, NULL, 0);
- trans = virgl_resource_create_transfer(&vctx->transfer_pool, resource,
- &vbuf->metadata, level, usage, box);
-
readback = virgl_res_needs_readback(vctx, vbuf, usage, 0);
if (readback)
vs->vws->transfer_get(vs->vws, vbuf->hw_res, box, trans->base.stride,