mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
VideoBackends:Vulkan: Fix command buffer cleanup
This commit is contained in:
parent
7498eb1e6c
commit
332824f7d5
@ -270,8 +270,8 @@ void CommandBufferManager::WaitForCommandBufferCompletion(u32 index)
|
|||||||
// Clean up any resources for command buffers between the last known completed buffer and this
|
// Clean up any resources for command buffers between the last known completed buffer and this
|
||||||
// now-completed command buffer. If we use >2 buffers, this may be more than one buffer.
|
// now-completed command buffer. If we use >2 buffers, this may be more than one buffer.
|
||||||
const u64 now_completed_counter = resources.fence_counter;
|
const u64 now_completed_counter = resources.fence_counter;
|
||||||
u32 cleanup_index = (index + 1) % NUM_COMMAND_BUFFERS;
|
u32 cleanup_index = (m_current_cmd_buffer + 1) % NUM_COMMAND_BUFFERS;
|
||||||
while (cleanup_index != index)
|
while (cleanup_index != m_current_cmd_buffer)
|
||||||
{
|
{
|
||||||
CmdBufferResources& cleanup_resources = m_command_buffers[cleanup_index];
|
CmdBufferResources& cleanup_resources = m_command_buffers[cleanup_index];
|
||||||
if (cleanup_resources.fence_counter > now_completed_counter)
|
if (cleanup_resources.fence_counter > now_completed_counter)
|
||||||
|
Loading…
Reference in New Issue
Block a user