vk: reset semaphore index to 0 when recreating the swap chain

When frame dupe is enabled and switching to fast forward, the current
semaphore index might end up pointing past the end of the semaphore
array, causing a crash.
Issue #1138
This commit is contained in:
Flyinghead 2023-07-10 12:41:13 +02:00
parent 17b82ab5d3
commit 3bf817aea1
1 changed files with 1 additions and 0 deletions

View File

@ -704,6 +704,7 @@ void VulkanContext::CreateSwapChain()
renderCompleteSemaphores.push_back(device->createSemaphoreUnique(vk::SemaphoreCreateInfo()));
imageAcquiredSemaphores.push_back(device->createSemaphoreUnique(vk::SemaphoreCreateInfo()));
}
currentSemaphore = 0;
quadPipeline->Init(shaderManager.get(), *renderPass, 0);
quadPipelineWithAlpha->Init(shaderManager.get(), *renderPass, 0);
quadDrawer->Init(quadPipeline.get());