From c205b50a7ea340f4622f4320e03df06686cb52a6 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 26 Sep 2024 00:24:23 +0200 Subject: [PATCH] move queues to device.c --- src/ptk_vk/device.c | 3 +++ src/ptk_vk/device.h | 3 +++ src/ptk_vk/init.c | 3 --- src/ptk_vk/init.h | 3 --- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ptk_vk/device.c b/src/ptk_vk/device.c index c26b8e1..0eeb9bb 100644 --- a/src/ptk_vk/device.c +++ b/src/ptk_vk/device.c @@ -16,6 +16,9 @@ VkDevice g_dev; +VkQueue g_graphics_queue; +VkQueue g_present_queue; + QueueFamilyIndices g_queue_family_indices = {0}; const size_t g_queue_family_count = sizeof(QueueFamilyIndices) / sizeof(PTK_OPTION(uint32_t)); diff --git a/src/ptk_vk/device.h b/src/ptk_vk/device.h index 2c8304d..a868eb9 100644 --- a/src/ptk_vk/device.h +++ b/src/ptk_vk/device.h @@ -25,6 +25,9 @@ typedef struct { extern QueueFamilyIndices g_queue_family_indices; extern const size_t g_queue_family_count; +extern VkQueue g_graphics_queue; +extern VkQueue g_present_queue; + PTK_OPTION(VkDevice) vk_create_logical_dev(VkPhysicalDevice physical_dev, VkSurfaceKHR surface, const PTK_ARRAY(constcharptr) validation_layers); #endif // PTK_PTK_VK_DEVICE_H_ diff --git a/src/ptk_vk/init.c b/src/ptk_vk/init.c index ccead7a..39a6ed3 100644 --- a/src/ptk_vk/init.c +++ b/src/ptk_vk/init.c @@ -32,9 +32,6 @@ GLFWwindow *g_window = NULL; VkSurfaceKHR g_surface = VK_NULL_HANDLE; -VkQueue g_graphics_queue = VK_NULL_HANDLE; -VkQueue g_present_queue = VK_NULL_HANDLE; - static VkDescriptorSetLayout m_descriptor_set_layout; static VkPipelineLayout m_pipeline_layout; static VkPipeline m_pipeline; diff --git a/src/ptk_vk/init.h b/src/ptk_vk/init.h index 745bb3c..5cb5179 100644 --- a/src/ptk_vk/init.h +++ b/src/ptk_vk/init.h @@ -17,9 +17,6 @@ extern VkPhysicalDevice g_physical_dev; extern GLFWwindow *g_window; -extern VkQueue g_graphics_queue; -extern VkQueue g_present_queue; - extern const size_t g_max_frames_in_flight; extern PTK_LIST(VkCommandBuffer) g_command_buffers;