¤t->base.box, true);
}
-static void set_queued(UNUSED struct virgl_transfer_queue *queue,
- struct list_action_args *args)
-{
- struct virgl_transfer *queued = args->queued;
- struct virgl_transfer **val = args->data;
- *val = queued;
-}
-
static void remove_transfer(struct virgl_transfer_queue *queue,
struct list_action_args *args)
{
}
}
-static void intersect_and_set_queued_once(struct virgl_transfer_queue *queue,
- struct list_iteration_args *iter)
-{
- struct list_action_args args;
- struct virgl_transfer *queued, *tmp;
- enum virgl_transfer_queue_lists type = iter->type;
-
- memset(&args, 0, sizeof(args));
- args.current = iter->current;
- args.data = iter->data;
-
- LIST_FOR_EACH_ENTRY_SAFE(queued, tmp, &queue->lists[type], queue_link) {
- if (transfers_intersect(queued, iter->current)) {
- args.queued = queued;
- set_queued(queue, &args);
- return;
- }
- }
-}
-
static void perform_action(struct virgl_transfer_queue *queue,
struct list_iteration_args *iter)
{
struct virgl_transfer *transfer)
{
struct virgl_transfer *queued = NULL;
- struct list_iteration_args iter;
/* We don't support extending from copy transfers. */
assert(!transfer->copy_src_hw_res);
if (transfer->base.resource->target == PIPE_BUFFER) {
- memset(&iter, 0, sizeof(iter));
- iter.current = transfer;
- iter.data = &queued;
- iter.type = PENDING_LIST;
- intersect_and_set_queued_once(queue, &iter);
+ queued = virgl_transfer_queue_find_pending(queue,
+ transfer->hw_res,
+ transfer->base.level,
+ &transfer->base.box,
+ true);
}
if (queued) {