Fix a race condition

This commit is contained in:
Henrik Rydgård committed 2023-08-16 13:54:07 +02:00
1 parent 07658ef41a
commit 41f55d5afc
1 file changed
+1 -1
+1 -1
View File
@@ -1391,8 +1391,8 @@ void VulkanRenderManager::Run(VKRRenderThreadTask &task) {
if (task.runType == VKRRunType::PRESENT) {
if (!frameData.skipSwap) {
VkResult res = frameData.QueuePresent(vulkan_, frameDataShared_);
frameTimeHistory_[frameData.frameId].queuePresent = time_now_d();
VkResult res = frameData.QueuePresent(vulkan_, frameDataShared_);
if (res == VK_ERROR_OUT_OF_DATE_KHR) {
// We clearly didn't get this in vkAcquireNextImageKHR because of the skipSwap check above.
// Do the increment.