summaryrefslogtreecommitdiff
path: root/render/vulkan/device.h
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-11-19 14:51:59 -0600
committerDanny Holman <dholman@gymli.org>2024-11-19 14:51:59 -0600
commite99a55baa8f353a42b43aa86e7dddc3d8b68d5dc (patch)
tree8cf8ddd208b389e2835bc25238b374386d0555de /render/vulkan/device.h
parent23712c9c011d77bb65426fdbc34d9409a291818e (diff)
render: create a vkqueue struct for Vulkan queues
Add a vkqueue struct to the Vulkan device interface and shift queue operations to helper functions that interact with this new struct. This makes the initialization routines more readable and simplifies the interface. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'render/vulkan/device.h')
-rw-r--r--render/vulkan/device.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/render/vulkan/device.h b/render/vulkan/device.h
index 6bdd4f5..e498137 100644
--- a/render/vulkan/device.h
+++ b/render/vulkan/device.h
@@ -34,18 +34,17 @@ struct vkswapchain_data {
uint32_t present_count;
};
+struct vkqueue {
+ uint32_t index;
+ uint32_t qfam;
+ VkQueue handle;
+};
+
struct vkdev {
VkPhysicalDevice pdev;
VkDevice ldev;
struct vkswapchain_data scdata;
- uint32_t gfx_index;
- uint32_t pres_index;
- uint32_t tsfr_index;
- uint32_t comp_index;
- VkQueue gfx_queue;
- VkQueue pres_queue;
- VkQueue tsfr_queue;
- VkQueue comp_queue;
+ struct vkqueue queues[4];
VkCommandPool cmd_pool;
VkFormat depth_format;
};