mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 07:21:25 +12:00
vk: Fix cb chunk synchronization deadlock
This commit is contained in:
parent
e1b734fd12
commit
24cb48971e
2 changed files with 9 additions and 3 deletions
|
@ -2349,11 +2349,12 @@ void VKGSRender::queue_swap_request()
|
||||||
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT);
|
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
|
// Set up a present request for this frame as well
|
||||||
present(m_current_frame);
|
present(m_current_frame);
|
||||||
|
|
||||||
m_current_frame->swap_command_buffer->pending = true;
|
|
||||||
|
|
||||||
// Grab next cb in line and make it usable
|
// 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_cb_index = (m_current_cb_index + 1) % VK_MAX_ASYNC_CB_COUNT;
|
||||||
m_current_command_buffer = &m_primary_cb_list[m_current_cb_index];
|
m_current_command_buffer = &m_primary_cb_list[m_current_cb_index];
|
||||||
|
|
|
@ -156,8 +156,13 @@ struct command_buffer_chunk: public vk::command_buffer
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void flush() const
|
void flush()
|
||||||
{
|
{
|
||||||
|
reader_lock lock(guard_mutex);
|
||||||
|
|
||||||
|
if (!pending)
|
||||||
|
return;
|
||||||
|
|
||||||
submit_fence->wait_flush();
|
submit_fence->wait_flush();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue