mirror of https://github.com/PCSX2/pcsx2.git
VulkanDevice: Add additional semaphore on swap chain
We don't actually need +1 semaphores, or, more than one really. But, the validation layer gets cranky if we don't fence wait before the next image acquire. So, add an additional semaphore to ensure that we're never acquiring before fence waiting.
This commit is contained in:
parent
162354decf
commit
7ed6801101
|
@ -442,9 +442,13 @@ bool VKSwapChain::CreateSwapChain()
|
||||||
m_images.push_back(std::move(texture));
|
m_images.push_back(std::move(texture));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_semaphores.reserve(image_count);
|
// We don't actually need +1 semaphores, or, more than one really.
|
||||||
m_current_semaphore = (image_count - 1);
|
// But, the validation layer gets cranky if we don't fence wait before the next image acquire.
|
||||||
for (u32 i = 0; i < image_count; i++)
|
// So, add an additional semaphore to ensure that we're never acquiring before fence waiting.
|
||||||
|
const u32 semaphore_count = (image_count + 1);
|
||||||
|
m_semaphores.reserve(semaphore_count);
|
||||||
|
m_current_semaphore = 0;
|
||||||
|
for (u32 i = 0; i < semaphore_count; i++)
|
||||||
{
|
{
|
||||||
ImageSemaphores sema;
|
ImageSemaphores sema;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue