mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VideoBackends:Vulkan: Wait until we've confirmed a successful AcquireNextImage before marking semaphores used
This commit is contained in:
@ -63,11 +63,18 @@ public:
|
||||
|
||||
// Returns the semaphore for the current command buffer, which can be used to ensure the
|
||||
// swap chain image is ready before the command buffer executes.
|
||||
// Once you've confirmed that the semaphore will be signalled this frame, call
|
||||
// `MarkCurrentCommandBufferSemaphoreUsed`.
|
||||
VkSemaphore GetCurrentCommandBufferSemaphore()
|
||||
{
|
||||
auto& resources = m_command_buffers[m_current_cmd_buffer];
|
||||
resources.semaphore_used = true;
|
||||
return resources.semaphore;
|
||||
return m_command_buffers[m_current_cmd_buffer].semaphore;
|
||||
}
|
||||
|
||||
// Marks the current command buffer's semaphore as used, so we'll wait on it in the next
|
||||
// command buffer submission.
|
||||
void MarkCurrentCommandBufferSemaphoreUsed()
|
||||
{
|
||||
m_command_buffers[m_current_cmd_buffer].semaphore_used = true;
|
||||
}
|
||||
|
||||
// Ensure that the worker thread has submitted any previous command buffers and is idle.
|
||||
|
Reference in New Issue
Block a user