summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_buffer.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2019-05-15 15:46:40 -0700
committerChia-I Wu <[email protected]>2019-06-12 18:20:30 -0700
commit74051efbea8f330fcd4b23bfe4d1ccf0c66d0e7e (patch)
treeebb2257adf5653ab72ea93f2ba191d37427cade6 /src/gallium/drivers/virgl/virgl_buffer.c
parent514e12b1b8fae55319cbc3702215a305e3d7d60f (diff)
virgl: pass virgl_context to transfer create/destroy
A pipe_transfer is a context object. It is fine for the constructor/destructor to have access to the context. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Alexandros Frantzis <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_buffer.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_buffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c
index 882fae2f8ba..ddb632db483 100644
--- a/src/gallium/drivers/virgl/virgl_buffer.c
+++ b/src/gallium/drivers/virgl/virgl_buffer.c
@@ -42,7 +42,7 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx,
enum virgl_transfer_map_type map_type;
void *map_addr;
- trans = virgl_resource_create_transfer(&vctx->transfer_pool, resource,
+ trans = virgl_resource_create_transfer(vctx, resource,
&vbuf->metadata, level, usage, box);
map_type = virgl_resource_transfer_prepare(vctx, trans);
@@ -67,7 +67,7 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx,
}
if (!map_addr) {
- virgl_resource_destroy_transfer(&vctx->transfer_pool, trans);
+ virgl_resource_destroy_transfer(vctx, trans);
return NULL;
}
@@ -89,14 +89,14 @@ static void virgl_buffer_transfer_unmap(struct pipe_context *ctx,
/* We don't need to transfer the contents of staging buffers, since they
* don't have any host-side storage. */
if (pipe_to_virgl_bind(vs, res->bind, res->flags) == VIRGL_BIND_STAGING) {
- virgl_resource_destroy_transfer(&vctx->transfer_pool, trans);
+ virgl_resource_destroy_transfer(vctx, trans);
return;
}
if (trans->base.usage & PIPE_TRANSFER_WRITE) {
if (transfer->usage & PIPE_TRANSFER_FLUSH_EXPLICIT) {
if (trans->range.end <= trans->range.start) {
- virgl_resource_destroy_transfer(&vctx->transfer_pool, trans);
+ virgl_resource_destroy_transfer(vctx, trans);
return;
}
@@ -109,12 +109,12 @@ static void virgl_buffer_transfer_unmap(struct pipe_context *ctx,
virgl_encode_copy_transfer(vctx, trans);
/* It's now safe for other mappings to use the transfer_uploader. */
vctx->transfer_uploader_in_use = false;
- virgl_resource_destroy_transfer(&vctx->transfer_pool, trans);
+ virgl_resource_destroy_transfer(vctx, trans);
} else {
virgl_transfer_queue_unmap(&vctx->queue, trans);
}
} else
- virgl_resource_destroy_transfer(&vctx->transfer_pool, trans);
+ virgl_resource_destroy_transfer(vctx, trans);
}
static void virgl_buffer_transfer_flush_region(struct pipe_context *ctx,