From 4162f149b2ce90690d809f23325b7769fb5a979e Mon Sep 17 00:00:00 2001 From: FakeMichau <49685661+FakeMichau@users.noreply.github.com> Date: Sun, 17 Aug 2025 13:11:30 +0200 Subject: [PATCH] Close dx12 on 11 cmdlists on creation --- OptiScaler/upscalers/IFeature_Dx11wDx12.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OptiScaler/upscalers/IFeature_Dx11wDx12.cpp b/OptiScaler/upscalers/IFeature_Dx11wDx12.cpp index 948a20d3..3384a71c 100644 --- a/OptiScaler/upscalers/IFeature_Dx11wDx12.cpp +++ b/OptiScaler/upscalers/IFeature_Dx11wDx12.cpp @@ -453,7 +453,7 @@ HRESULT IFeature_Dx11wDx12::CreateDx12Device(D3D_FEATURE_LEVEL InFeatureLevel) } } - if (Dx12CommandList[0] == nullptr) + if (Dx12CommandList[0] == nullptr && Dx12CommandAllocator[0] != nullptr) { // CreateCommandList result = State::Instance().currentD3D12Device->CreateCommandList( @@ -466,9 +466,11 @@ HRESULT IFeature_Dx11wDx12::CreateDx12Device(D3D_FEATURE_LEVEL InFeatureLevel) State::Instance().skipSpoofing = false; return E_NOINTERFACE; } + + Dx12CommandList[0]->Close(); } - if (Dx12CommandList[1] == nullptr) + if (Dx12CommandList[1] == nullptr && Dx12CommandAllocator[1] != nullptr) { // CreateCommandList result = State::Instance().currentD3D12Device->CreateCommandList( @@ -481,6 +483,8 @@ HRESULT IFeature_Dx11wDx12::CreateDx12Device(D3D_FEATURE_LEVEL InFeatureLevel) State::Instance().skipSpoofing = false; return E_NOINTERFACE; } + + Dx12CommandList[1]->Close(); } if (Dx12Fence == nullptr)