Debian Codegraph @

src/imagination/vulkan/pvr_queue.h

raw
1 /*
2 * Copyright © 2022 Imagination Technologies Ltd.
3 *
4 * based in part on anv driver which is:
5 * Copyright © 2015 Intel Corporation
6 *
7 * based in part on radv driver which is:
8 * Copyright © 2016 Red Hat.
9 * Copyright © 2016 Bas Nieuwenhuizen
10 *
11 * SPDX-License-Identifier: MIT
12 */
13
14 #ifndef PVR_QUEUE_H
15 #define PVR_QUEUE_H
16
17 #include "pvr_macros.h"
18 #include "vk_queue.h"
19
20 #include "pvr_common.h"
21
22 struct vk_sync;
23
24 struct pvr_device;
25 struct pvr_render_ctx;
26 struct pvr_compute_ctx;
27 struct pvr_transfer_ctx;
28
29 struct pvr_queue {
30 struct vk_queue vk;
31
32 struct pvr_device *device;
33
34 struct pvr_render_ctx *gfx_ctx;
35 struct pvr_compute_ctx *compute_ctx;
36 struct pvr_compute_ctx *query_ctx;
37 struct pvr_transfer_ctx *transfer_ctx;
38
39 struct vk_sync *last_job_signal_sync[PVR_JOB_TYPE_MAX];
40 struct vk_sync *next_job_wait_sync[PVR_JOB_TYPE_MAX];
41 };
42
43 VK_DEFINE_HANDLE_CASTS(pvr_queue, vk.base, VkQueue, VK_OBJECT_TYPE_QUEUE)
44
45 #ifdef PVR_PER_ARCH
46 VkResult PVR_PER_ARCH(queues_create)(struct pvr_device *device,
47 const VkDeviceCreateInfo *pCreateInfo);
48 # define pvr_arch_queues_create PVR_PER_ARCH(queues_create)
49
50 void PVR_PER_ARCH(queues_destroy)(struct pvr_device *device);
51 # define pvr_arch_queues_destroy PVR_PER_ARCH(queues_destroy)
52
53 #endif /* PVR_PER_ARCH */
54
55 #endif /* PVR_QUEUE_H */