aboutsummaryrefslogtreecommitdiff
path: root/xbmc/rendering/dx/DeviceResources.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/rendering/dx/DeviceResources.cpp')
-rw-r--r--xbmc/rendering/dx/DeviceResources.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/xbmc/rendering/dx/DeviceResources.cpp b/xbmc/rendering/dx/DeviceResources.cpp
index 8cfe5cf62c..103809d591 100644
--- a/xbmc/rendering/dx/DeviceResources.cpp
+++ b/xbmc/rendering/dx/DeviceResources.cpp
@@ -729,7 +729,6 @@ void DX::DeviceResources::ResizeBuffers()
ComPtr<IDXGIDevice1> dxgiDevice;
hr = m_d3dDevice.As(&dxgiDevice); CHECK_ERR();
dxgiDevice->SetMaximumFrameLatency(1);
- m_usedSwapChain = false;
if (m_IsHDROutput)
SetHdrColorSpace(DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020);
@@ -960,7 +959,6 @@ void DX::DeviceResources::HandleDeviceLost(bool removed)
bool DX::DeviceResources::Begin()
{
HRESULT hr = m_swapChain->Present(0, DXGI_PRESENT_TEST);
- m_usedSwapChain = true;
// If the device was removed either by a disconnection or a driver upgrade, we
// must recreate all device resources.
@@ -992,7 +990,6 @@ void DX::DeviceResources::Present()
// frames that will never be displayed to the screen.
DXGI_PRESENT_PARAMETERS parameters = {};
HRESULT hr = m_swapChain->Present1(1, 0, &parameters);
- m_usedSwapChain = true;
// If the device was removed either by a disconnection or a driver upgrade, we
// must recreate all device resources.
@@ -1311,23 +1308,6 @@ void DX::DeviceResources::SetHdrColorSpace(const DXGI_COLOR_SPACE_TYPE colorSpac
if (SUCCEEDED(m_swapChain.As(&swapChain3)))
{
- // Set the color space on a new swap chain - not mandated by MS documentation but needed
- // at least for some AMD on Windows 10, at least up to driver 31.0.21001.45002
- // Applying to AMD only because it breaks refresh rate switching in Windows 11 for Intel and
- // nVidia and they don't need the workaround.
- if (m_usedSwapChain &&
- m_IsTransferPQ != (colorSpace == DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020))
- {
- if (GetAdapterDesc().VendorId == PCIV_AMD)
- {
- // Temporary release, can't hold references during swap chain re-creation
- swapChain3 = nullptr;
- DestroySwapChain();
- CreateWindowSizeDependentResources();
- m_swapChain.As(&swapChain3);
- }
- }
-
if (SUCCEEDED(swapChain3->SetColorSpace1(colorSpace)))
{
m_IsTransferPQ = (colorSpace == DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020);