fix freeze when swapchain maintenance is enabled

This commit is contained in:
PancakeTAS 2025-07-18 15:08:22 +02:00 committed by Pancake
parent 06fc427bdd
commit 45736c15ee
2 changed files with 6 additions and 4 deletions

View file

@ -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)

View file

@ -208,7 +208,6 @@ void Utils::resetLimitN(const std::string& id) noexcept {
logCounts().erase(id);
}
/// Get the process name
std::pair<std::string, std::string> Utils::getProcessName() {
const char* benchmark_flag = std::getenv("LSFG_BENCHMARK");
if (benchmark_flag)
@ -233,7 +232,6 @@ std::pair<std::string, std::string> 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')