1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

vk: Fix cb chunk synchronization deadlock

This commit is contained in:
kd-11 2019-12-19 15:25:46 +03:00 committed by kd-11
parent e1b734fd12
commit 24cb48971e
2 changed files with 9 additions and 3 deletions

View File

@ -2349,11 +2349,12 @@ void VKGSRender::queue_swap_request()
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT);
}
// Signal pending state as the command queue is now closed
m_current_frame->swap_command_buffer->pending = true;
// Set up a present request for this frame as well
present(m_current_frame);
m_current_frame->swap_command_buffer->pending = true;
// Grab next cb in line and make it usable
m_current_cb_index = (m_current_cb_index + 1) % VK_MAX_ASYNC_CB_COUNT;
m_current_command_buffer = &m_primary_cb_list[m_current_cb_index];

View File

@ -156,8 +156,13 @@ struct command_buffer_chunk: public vk::command_buffer
return ret;
}
void flush() const
void flush()
{
reader_lock lock(guard_mutex);
if (!pending)
return;
submit_fence->wait_flush();
}
};