From e99a55baa8f353a42b43aa86e7dddc3d8b68d5dc Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Tue, 19 Nov 2024 14:51:59 -0600 Subject: 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 --- render/vulkan/device.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'render/vulkan/device.h') 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; }; -- cgit v1.2.3