vk: Explicit initialization of command pool queue family

This commit is contained in:
kd-11 2021-02-25 22:23:22 +03:00 committed by kd-11
commit d2de8a87bf
2 changed files with 3 additions and 3 deletions

View file

@ -399,7 +399,7 @@ VKGSRender::VKGSRender() : GSRender()
} }
//create command buffer... //create command buffer...
m_command_buffer_pool.create((*m_device)); m_command_buffer_pool.create((*m_device), m_device->get_graphics_queue_family());
for (auto &cb : m_primary_cb_list) for (auto &cb : m_primary_cb_list)
{ {
@ -410,7 +410,7 @@ VKGSRender::VKGSRender() : GSRender()
m_current_command_buffer = &m_primary_cb_list[0]; m_current_command_buffer = &m_primary_cb_list[0];
//Create secondary command_buffer for parallel operations //Create secondary command_buffer for parallel operations
m_secondary_command_buffer_pool.create((*m_device)); m_secondary_command_buffer_pool.create((*m_device), m_device->get_graphics_queue_family());
m_secondary_command_buffer.create(m_secondary_command_buffer_pool, true); m_secondary_command_buffer.create(m_secondary_command_buffer_pool, true);
m_secondary_command_buffer.access_hint = vk::command_buffer::access_type_hint::all; m_secondary_command_buffer.access_hint = vk::command_buffer::access_type_hint::all;

View file

@ -16,7 +16,7 @@ namespace vk
command_pool() = default; command_pool() = default;
~command_pool() = default; ~command_pool() = default;
void create(vk::render_device& dev, u32 queue_family = 0); void create(vk::render_device& dev, u32 queue_family);
void destroy(); void destroy();
vk::render_device& get_owner() const; vk::render_device& get_owner() const;