blob: 28925bfcb50d8745d840d4a25265ec13eca4a8d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*
* Copyright © 2016 Red Hat.
* Copyright © 2016 Bas Nieuwenhuizen
* SPDX-License-Identifier: MIT
*
* based in part on anv driver which is:
* Copyright © 2015 Intel Corporation
*/
#ifndef TU_QUEUE_H
#define TU_QUEUE_H
#include "tu_common.h"
enum tu_queue_type
{
TU_QUEUE_GFX,
TU_QUEUE_SPARSE,
};
struct tu_queue
{
struct vk_queue vk;
struct tu_device *device;
enum tu_queue_type type;
uint32_t msm_queue_id;
uint32_t priority;
uint32_t sparse_queue_id;
uint32_t sparse_syncobj, gfx_syncobj;
uint64_t sparse_timepoint, gfx_timepoint;
unsigned render_pass_idx;
int fence; /* timestamp/fence of the last queue submission */
};
VK_DEFINE_HANDLE_CASTS(tu_queue, vk.base, VkQueue, VK_OBJECT_TYPE_QUEUE)
VkResult
tu_queue_init(struct tu_device *device,
struct tu_queue *queue,
enum tu_queue_type type,
int idx,
const VkDeviceQueueCreateInfo *create_info);
void
tu_queue_finish(struct tu_queue *queue);
#endif
|