mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Vulkan: Only submit init/upload command buffer when it has commands
This way we're not submitting empty buffers when it's unnecessary.
This commit is contained in:
@ -35,8 +35,9 @@ public:
|
||||
VkCommandPool GetCommandPool() const { return m_command_pool; }
|
||||
// These command buffers are allocated per-frame. They are valid until the command buffer
|
||||
// is submitted, after that you should call these functions again.
|
||||
VkCommandBuffer GetCurrentInitCommandBuffer() const
|
||||
VkCommandBuffer GetCurrentInitCommandBuffer()
|
||||
{
|
||||
m_frame_resources[m_current_frame].init_command_buffer_used = true;
|
||||
return m_frame_resources[m_current_frame].command_buffers[0];
|
||||
}
|
||||
VkCommandBuffer GetCurrentCommandBuffer() const
|
||||
@ -119,6 +120,7 @@ private:
|
||||
std::array<VkCommandBuffer, 2> command_buffers;
|
||||
VkDescriptorPool descriptor_pool;
|
||||
VkFence fence;
|
||||
bool init_command_buffer_used;
|
||||
bool needs_fence_wait;
|
||||
|
||||
std::vector<DeferredResourceDestruction> cleanup_resources;
|
||||
|
Reference in New Issue
Block a user