| 1 |
|
| 2 |
. |
| 3 |
|
| 4 |
|
| 5 |
|
| 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 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 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 |