Use DelayedDestroy for DX11 and VK upscalers

Should speed up upscaler switching for those backends
This commit is contained in:
FakeMichau
2026-05-01 20:05:30 +02:00
parent 0fe0b1708f
commit 2ef10efb7d
2 changed files with 12 additions and 8 deletions
@@ -141,11 +141,13 @@ bool FeatureProvider_Dx11::ChangeFeature(Upscaler upscaler, ID3D11Device* device
State::Instance().currentFeature = nullptr;
LOG_TRACE("sleeping before reset of current feature for 1000ms");
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
Util::DelayedDestroy(std::move(contextData->feature));
contextData->feature.reset();
contextData->feature = nullptr;
// LOG_TRACE("sleeping before reset of current feature for 1000ms");
// std::this_thread::sleep_for(std::chrono::milliseconds(1000));
// contextData->feature.reset();
// contextData->feature = nullptr;
}
else
{
+6 -4
View File
@@ -142,11 +142,13 @@ bool FeatureProvider_Vk::ChangeFeature(Upscaler upscaler, VkInstance instance, V
State::Instance().currentFeature = nullptr;
LOG_DEBUG("sleeping before reset of current feature for 1000ms");
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
Util::DelayedDestroy(std::move(contextData->feature));
contextData->feature.reset();
contextData->feature = nullptr;
// LOG_DEBUG("sleeping before reset of current feature for 1000ms");
// std::this_thread::sleep_for(std::chrono::milliseconds(1000));
// contextData->feature.reset();
// contextData->feature = nullptr;
}
else
{