Update XeSSFeature_Dx11.cpp

Always update internal dx11 device and context
This commit is contained in:
cdozdil
2024-03-02 13:02:43 +03:00
committed by GitHub
parent f48c51cef2
commit 6e920522fa
+9 -15
View File
@@ -278,28 +278,22 @@ bool XeSSFeatureDx11::Init(ID3D11Device* device, ID3D11DeviceContext* context, c
return false;
}
if (!Dx11DeviceContext)
auto contextResult = context->QueryInterface(IID_PPV_ARGS(&Dx11DeviceContext));
if (contextResult != S_OK)
{
auto contextResult = context->QueryInterface(IID_PPV_ARGS(&Dx11DeviceContext));
if (contextResult != S_OK)
{
spdlog::error("XeSSFeatureDx11::Init QueryInterface ID3D11DeviceContext4 result: {0:x}", contextResult);
return false;
}
spdlog::error("XeSSFeatureDx11::Init QueryInterface ID3D11DeviceContext4 result: {0:x}", contextResult);
return false;
}
if (!device)
Dx11DeviceContext->GetDevice(&device);
if (!Dx11Device)
{
auto dx11DeviceResult = device->QueryInterface(IID_PPV_ARGS(&Dx11Device));
auto dx11DeviceResult = device->QueryInterface(IID_PPV_ARGS(&Dx11Device));
if (dx11DeviceResult != S_OK)
{
spdlog::error("XeSSFeatureDx11::Init QueryInterface ID3D11Device5 result: {0:x}", dx11DeviceResult);
return false;
}
if (dx11DeviceResult != S_OK)
{
spdlog::error("XeSSFeatureDx11::Init QueryInterface ID3D11Device5 result: {0:x}", dx11DeviceResult);
return false;
}
if (!Dx12on11Device)