mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-05-03 16:21:46 +00:00
Use DelayedDestroy for DX11 and VK upscalers
Should speed up upscaler switching for those backends
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user