move queues to device.c

This commit is contained in:
jacekpoz 2024-09-26 00:24:23 +02:00
parent d698a52a9a
commit c205b50a7e
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
4 changed files with 6 additions and 6 deletions

View file

@ -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));

View file

@ -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_

View file

@ -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;

View file

@ -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;