Debian Codegraph @

src/kosmickrisp/vulkan/kk_queue.h

raw symbols SCIP
1 /*
2 * Copyright © 2022 Collabora Ltd. and Red Hat Inc.
3 * Copyright 2025 LunarG, Inc.
4 * Copyright 2025 Google LLC
5 * SPDX-License-Identifier: MIT
6 */
7
8 #ifndef KK_QUEUE_H
9 #define KK_QUEUE_H 1
10
11 #include "kk_private.h"
12
13 #include "kosmickrisp/bridge/mtl_types.h"
14
15 #include "vk_queue.h"
16
17 struct kk_queue {
18 struct vk_queue vk;
19 /* We require one queue per command buffer no to lock. Main will handle all
20 * work, but if we are in a render pass and we require to massage inputs,
21 * then pre_gfx will be used to submit compute work that handles that so we
22 * don't have to break the render encoder. */
23 struct {
24 struct mtl_command_queue *mtl_handle;
25 } main, pre_gfx;
26
27 mtl_fence *wait_fence;
28 };
29
30 static inline struct kk_device *
31 kk_queue_device(struct kk_queue *queue)
32 {
33 return (struct kk_device *)queue->vk.base.device;
34 }
35
36 VkResult kk_queue_init(struct kk_device *dev, struct kk_queue *queue,
37 const VkDeviceQueueCreateInfo *pCreateInfo,
38 uint32_t index_in_family);
39
40 void kk_queue_finish(struct kk_device *dev, struct kk_queue *queue);
41
42 #endif