get rid of another unnecessary global
This commit is contained in:
parent
e371324976
commit
849b9d01bf
2 changed files with 4 additions and 5 deletions
|
@ -18,7 +18,7 @@ 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));
|
||||
static const size_t m_queue_family_count = sizeof(QueueFamilyIndices) / sizeof(PTK_OPTION(uint32_t));
|
||||
|
||||
PTK_LIST_DEFINE(VkQueueFamilyProperties);
|
||||
|
||||
|
@ -96,9 +96,9 @@ PTK_OPTION(VkDevice) vk_create_logical_dev(VkPhysicalDevice physical_dev, VkSurf
|
|||
return PTK_OPTION_NONE(VkDevice);
|
||||
}
|
||||
|
||||
VkDeviceQueueCreateInfo queue_create_infos[g_queue_family_count];
|
||||
VkDeviceQueueCreateInfo queue_create_infos[m_queue_family_count];
|
||||
|
||||
for (size_t i = 0; i < g_queue_family_count; ++i) {
|
||||
for (size_t i = 0; i < m_queue_family_count; ++i) {
|
||||
const PTK_OPTION(uint32_t) index = *(((PTK_OPTION(uint32_t) *)&g_queue_family_indices) + i);
|
||||
|
||||
queue_create_infos[i] = (VkDeviceQueueCreateInfo){
|
||||
|
@ -120,7 +120,7 @@ PTK_OPTION(VkDevice) vk_create_logical_dev(VkPhysicalDevice physical_dev, VkSurf
|
|||
.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
|
||||
.pNext = NULL,
|
||||
.flags = 0,
|
||||
.queueCreateInfoCount = g_queue_family_count,
|
||||
.queueCreateInfoCount = m_queue_family_count,
|
||||
.pQueueCreateInfos = queue_create_infos,
|
||||
.enabledLayerCount = validation_layers.size,
|
||||
.ppEnabledLayerNames = validation_layers.data,
|
||||
|
|
|
@ -21,7 +21,6 @@ typedef struct {
|
|||
} QueueFamilyIndices;
|
||||
|
||||
extern QueueFamilyIndices g_queue_family_indices;
|
||||
extern const size_t g_queue_family_count;
|
||||
|
||||
extern VkQueue g_graphics_queue;
|
||||
extern VkQueue g_present_queue;
|
||||
|
|
Loading…
Reference in a new issue