From 42fcd399f41d1a9de0ac6c361f8c47c71e053d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 26 Sep 2023 01:58:15 +0200 Subject: [PATCH] Restore the ReadyForFence flag. Some paranoia probably --- Common/GPU/Vulkan/VulkanRenderManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index fff194adc256..4414af64f9c0 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -288,7 +288,6 @@ bool VulkanRenderManager::CreateBackbuffers() { return false; } - VkCommandBuffer cmdInit = GetInitCmd(); if (!queueRunner_.CreateSwapchain(cmdInit)) { @@ -310,6 +309,11 @@ bool VulkanRenderManager::CreateBackbuffers() { outOfDateFrames_ = 0; + for (int i = 0; i < vulkan_->GetInflightFrames(); i++) { + auto &frameData = frameData_[i]; + frameData.readyForFence = true; // Just in case. + } + // Start the thread(s). if (HasBackbuffers()) { run_ = true; // For controlling the compiler thread's exit