vkr: store queue id in vkr_queue_sync

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
macos/master
Yiwei Zhang 3 years ago
parent e8b4029d0e
commit e9b685e715
  1. 5
      src/venus/vkr_context.c
  2. 4
      src/venus/vkr_queue.c
  3. 2
      src/venus/vkr_queue.h

@ -99,7 +99,8 @@ vkr_context_submit_fence_locked(struct virgl_context *base,
return -EINVAL;
struct vkr_device *dev = queue->device;
struct vkr_queue_sync *sync = vkr_device_alloc_queue_sync(dev, flags, fence_cookie);
struct vkr_queue_sync *sync =
vkr_device_alloc_queue_sync(dev, flags, queue->base.id, fence_cookie);
if (!sync)
return -ENOMEM;
@ -162,7 +163,7 @@ vkr_context_retire_fences_locked(UNUSED struct virgl_context *base)
vkr_queue_retire_syncs(queue, &retired_syncs, &queue_empty);
LIST_FOR_EACH_ENTRY_SAFE (sync, sync_tmp, &retired_syncs, head) {
ctx->base.fence_retire(&ctx->base, queue->base.id, sync->fence_cookie);
ctx->base.fence_retire(&ctx->base, sync->queue_id, sync->fence_cookie);
vkr_device_free_queue_sync(dev, sync);
}

@ -18,6 +18,7 @@
struct vkr_queue_sync *
vkr_device_alloc_queue_sync(struct vkr_device *dev,
uint32_t fence_flags,
uint64_t queue_id,
void *fence_cookie)
{
struct vkr_queue_sync *sync;
@ -58,6 +59,7 @@ vkr_device_alloc_queue_sync(struct vkr_device *dev,
}
sync->flags = fence_flags;
sync->queue_id = queue_id;
sync->fence_cookie = fence_cookie;
return sync;
@ -191,7 +193,7 @@ vkr_queue_thread(void *arg)
list_del(&sync->head);
if (vkr_renderer_flags & VKR_RENDERER_ASYNC_FENCE_CB) {
ctx->base.fence_retire(&ctx->base, queue->base.id, sync->fence_cookie);
ctx->base.fence_retire(&ctx->base, sync->queue_id, sync->fence_cookie);
vkr_device_free_queue_sync(queue->device, sync);
} else {
list_addtail(&sync->head, &queue->signaled_syncs);

@ -12,6 +12,7 @@ struct vkr_queue_sync {
VkFence fence;
uint32_t flags;
uint64_t queue_id;
void *fence_cookie;
struct list_head head;
@ -81,6 +82,7 @@ vkr_context_init_event_dispatch(struct vkr_context *ctx);
struct vkr_queue_sync *
vkr_device_alloc_queue_sync(struct vkr_device *dev,
uint32_t fence_flags,
uint64_t queue_id,
void *fence_cookie);
void

Loading…
Cancel
Save