mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-26 16:17:01 +00:00
Remove unnecessary menu object destroy calls. Should fix disappearing menu on Linux
This commit is contained in:
@@ -126,10 +126,11 @@ static VkResult hkvkCreateInstance(const VkInstanceCreateInfo* pCreateInfo, cons
|
||||
#endif
|
||||
}
|
||||
|
||||
if (result == VK_SUCCESS && !State::Instance().vulkanSkipHooks)
|
||||
{
|
||||
MenuOverlayVk::DestroyVulkanObjects(false);
|
||||
}
|
||||
// Disabled to prevent unnecessary object release
|
||||
// if (result == VK_SUCCESS && !State::Instance().vulkanSkipHooks)
|
||||
//{
|
||||
// MenuOverlayVk::DestroyVulkanObjects(false);
|
||||
// }
|
||||
|
||||
LOG_FUNC_RESULT(result);
|
||||
|
||||
@@ -153,7 +154,8 @@ static VkResult hkvkCreateDevice(VkPhysicalDevice physicalDevice, const VkDevice
|
||||
{
|
||||
if (!State::Instance().vulkanSkipHooks)
|
||||
{
|
||||
MenuOverlayVk::DestroyVulkanObjects(false);
|
||||
// Disabled to prevent unnecessary object release
|
||||
// MenuOverlayVk::DestroyVulkanObjects(false);
|
||||
|
||||
_PD = physicalDevice;
|
||||
LOG_DEBUG("_PD captured: {0:X}", (UINT64) _PD);
|
||||
|
||||
@@ -611,24 +611,17 @@ bool FSR31FeatureDx11on12::InitFSR3(const NVSDK_NGX_Parameter* InParameters)
|
||||
versionQuery.device = _dx11on12Device; // only for DirectX 12 applications
|
||||
uint64_t versionCount = 0;
|
||||
versionQuery.outputCount = &versionCount;
|
||||
{
|
||||
// WAR for FSR 4.1 calling dxgi, this calling vkCreateInstance on Linux
|
||||
// and that destroying vulkan objects and the menu
|
||||
ScopedSkipVulkanHooks skipVulkanHooks;
|
||||
// get number of versions for allocation
|
||||
FfxApiProxy::D3D12_Query(nullptr, &versionQuery.header);
|
||||
}
|
||||
|
||||
// get number of versions for allocation
|
||||
FfxApiProxy::D3D12_Query(nullptr, &versionQuery.header);
|
||||
|
||||
State::Instance().ffxUpscalerVersionIds.resize(versionCount);
|
||||
State::Instance().ffxUpscalerVersionNames.resize(versionCount);
|
||||
versionQuery.versionIds = State::Instance().ffxUpscalerVersionIds.data();
|
||||
versionQuery.versionNames = State::Instance().ffxUpscalerVersionNames.data();
|
||||
{
|
||||
// Same as above
|
||||
ScopedSkipVulkanHooks skipVulkanHooks;
|
||||
// fill version ids and names arrays.
|
||||
FfxApiProxy::D3D12_Query(nullptr, &versionQuery.header);
|
||||
}
|
||||
|
||||
// fill version ids and names arrays.
|
||||
FfxApiProxy::D3D12_Query(nullptr, &versionQuery.header);
|
||||
|
||||
_contextDesc.flags = 0;
|
||||
_contextDesc.header.type = FFX_API_CREATE_CONTEXT_DESC_TYPE_UPSCALE;
|
||||
|
||||
Reference in New Issue
Block a user