virgl_init_so_functions(vctx);
slab_create_child(&vctx->transfer_pool, &rs->transfer_pool);
- virgl_transfer_queue_init(&vctx->queue, rs, &vctx->transfer_pool);
+ virgl_transfer_queue_init(&vctx->queue, vctx);
vctx->encoded_transfers = (rs->vws->supports_encoded_transfers &&
(rs->caps.caps.v2.capability_bits & VIRGL_CAP_TRANSFER));
#include "util/u_inlines.h"
#include "virgl_protocol.h"
+#include "virgl_context.h"
#include "virgl_screen.h"
#include "virgl_encode.h"
#include "virgl_resource.h"
struct pipe_resource *pres = queued->base.resource;
list_del(&queued->queue_link);
pipe_resource_reference(&pres, NULL);
- virgl_resource_destroy_transfer(queue->pool, queued);
+ virgl_resource_destroy_transfer(&queue->vctx->transfer_pool, queued);
}
static void replace_unmapped_transfer(struct virgl_transfer_queue *queue,
void virgl_transfer_queue_init(struct virgl_transfer_queue *queue,
- struct virgl_screen *vs,
- struct slab_child_pool *pool)
+ struct virgl_context *vctx)
{
+ struct virgl_screen *vs = virgl_screen(vctx->base.screen);
+
queue->vs = vs;
- queue->pool = pool;
+ queue->vctx = vctx;
queue->num_dwords = 0;
for (uint32_t i = 0; i < MAX_LISTS; i++)
vws->cmd_buf_destroy(queue->tbuf);
queue->vs = NULL;
- queue->pool = NULL;
+ queue->vctx = NULL;
queue->tbuf = NULL;
queue->num_dwords = 0;
}
struct virgl_cmd_buf;
struct virgl_screen;
-struct virgl_slab_child_pool;
+struct virgl_context;
struct virgl_transfer;
enum virgl_transfer_queue_lists {
struct virgl_transfer_queue {
struct list_head lists[MAX_LISTS];
struct virgl_screen *vs;
- struct slab_child_pool *pool;
+ struct virgl_context *vctx;
struct virgl_cmd_buf *tbuf;
uint32_t num_dwords;
};
void virgl_transfer_queue_init(struct virgl_transfer_queue *queue,
- struct virgl_screen *vs,
- struct slab_child_pool *pool);
+ struct virgl_context *vctx);
void virgl_transfer_queue_fini(struct virgl_transfer_queue *queue);