From 45736c15ee990c0e0ed8bade73ef7123a0574637 Mon Sep 17 00:00:00 2001 From: PancakeTAS Date: Fri, 18 Jul 2025 15:08:22 +0200 Subject: [PATCH] fix freeze when swapchain maintenance is enabled --- src/hooks.cpp | 8 ++++++-- src/utils/utils.cpp | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index c663d40..e50c886 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -261,12 +261,16 @@ namespace { try { // ensure config is valid auto& conf = Config::activeConf; - if (!conf.valid->load(std::memory_order_relaxed)) + if (!conf.valid->load(std::memory_order_relaxed)) { + Layer::ovkQueuePresentKHR(queue, pPresentInfo); return VK_ERROR_OUT_OF_DATE_KHR; + } // ensure present mode is still valid - if (present != conf.e_present) + if (present != conf.e_present) { + Layer::ovkQueuePresentKHR(queue, pPresentInfo); return VK_ERROR_OUT_OF_DATE_KHR; + } // skip if disabled if (!conf.enable) diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index 33889ea..458c0a0 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -208,7 +208,6 @@ void Utils::resetLimitN(const std::string& id) noexcept { logCounts().erase(id); } -/// Get the process name std::pair Utils::getProcessName() { const char* benchmark_flag = std::getenv("LSFG_BENCHMARK"); if (benchmark_flag) @@ -233,7 +232,6 @@ std::pair Utils::getProcessName() { return{ std::string(exe.data()), comm_str }; } -/// Get the config file std::string Utils::getConfigFile() { const char* configFile = std::getenv("LSFG_CONFIG"); if (configFile && *configFile != '\0')