rid command_pool from globals
This commit is contained in:
parent
26dda0f7a5
commit
d698a52a9a
3 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
|||
#include <ptk_vk/device.h>
|
||||
#include <ptk_vk/utils.h>
|
||||
|
||||
PTK_OPTION(VkCommandPool) vk_create_command_pool(VkDevice dev) {
|
||||
PTK_OPTION(VkCommandPool) vk_create_command_pool(VkDevice dev, uint32_t graphics_queue_family_index) {
|
||||
VkCommandPool ret;
|
||||
|
||||
VK_TRY(PTK_OPTION_NONE(VkCommandPool),
|
||||
|
@ -15,7 +15,7 @@ PTK_OPTION(VkCommandPool) vk_create_command_pool(VkDevice dev) {
|
|||
.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
|
||||
.pNext = NULL,
|
||||
.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,
|
||||
.queueFamilyIndex = /* TODO: get rid of this */g_queue_family_indices.graphics.value,
|
||||
.queueFamilyIndex = graphics_queue_family_index,
|
||||
},
|
||||
NULL,
|
||||
&ret
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
PTK_OPTION_DEFINE(VkCommandPool);
|
||||
|
||||
PTK_OPTION(VkCommandPool) vk_create_command_pool(VkDevice dev);
|
||||
PTK_OPTION(VkCommandPool) vk_create_command_pool(VkDevice dev, uint32_t graphics_queue_family_index);
|
||||
|
||||
#endif // PTK_PTK_VK_COMMAND_POOL_H_
|
||||
|
|
|
@ -247,7 +247,7 @@ bool vk_init(GLFWwindow *window, const size_t width, const size_t height, const
|
|||
return false;
|
||||
}
|
||||
|
||||
PTK_OPTION(VkCommandPool) command_pool_opt = vk_create_command_pool(g_dev);
|
||||
PTK_OPTION(VkCommandPool) command_pool_opt = vk_create_command_pool(g_dev, g_queue_family_indices.graphics.value);
|
||||
|
||||
if (!command_pool_opt.exists) {
|
||||
PTK_ERR("failed creating command pool");
|
||||
|
|
Loading…
Reference in a new issue