• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2019 Google LLC
3  * SPDX-License-Identifier: MIT
4  *
5  * based in part on anv and radv which are:
6  * Copyright © 2015 Intel Corporation
7  * Copyright © 2016 Red Hat.
8  * Copyright © 2016 Bas Nieuwenhuizen
9  */
10 
11 #ifndef VN_DEVICE_H
12 #define VN_DEVICE_H
13 
14 #include "vn_common.h"
15 
16 #include "vn_buffer.h"
17 #include "vn_device_memory.h"
18 #include "vn_feedback.h"
19 
20 struct vn_device {
21    struct vn_device_base base;
22 
23    struct vn_instance *instance;
24    struct vn_physical_device *physical_device;
25    struct vn_renderer *renderer;
26 
27    /* unique queue family indices in which to create the device queues */
28    uint32_t *queue_families;
29    uint32_t queue_family_count;
30 
31    struct vn_device_memory_pool memory_pools[VK_MAX_MEMORY_TYPES];
32 
33    struct vn_buffer_cache buffer_cache;
34 
35    struct vn_feedback_pool feedback_pool;
36 
37    /* feedback cmd pool per queue family used by the device
38     * - length matches queue_family_count
39     * - order matches queue_families
40     */
41    struct vn_feedback_cmd_pool *cmd_pools;
42 
43    struct vn_queue *queues;
44    uint32_t queue_count;
45 };
46 VK_DEFINE_HANDLE_CASTS(vn_device,
47                        base.base.base,
48                        VkDevice,
49                        VK_OBJECT_TYPE_DEVICE)
50 
51 #endif /* VN_DEVICE_H */
52