From ff00873610a3cd55e76245ef0aae892026fedd9b Mon Sep 17 00:00:00 2001 From: Silent Date: Sun, 21 Jul 2019 17:10:51 +0200 Subject: D3D11: Query for output merger logic op support and use logic op code only if supported Previously code assumed that if DX11.1 runtime is supported, logic ops will, but Windows 7 SP1 with a Platform Update supports DX11.1 runtime without logic ops. This created pretty jarring visual artifacts, which now should be gone OR replaced with much less jarring errors. --- Source/Core/VideoBackends/D3D/DXTexture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/D3D/DXTexture.cpp') diff --git a/Source/Core/VideoBackends/D3D/DXTexture.cpp b/Source/Core/VideoBackends/D3D/DXTexture.cpp index 6ab445868e..e2e818d637 100644 --- a/Source/Core/VideoBackends/D3D/DXTexture.cpp +++ b/Source/Core/VideoBackends/D3D/DXTexture.cpp @@ -12,6 +12,7 @@ #include "VideoBackends/D3D/D3DState.h" #include "VideoBackends/D3D/DXTexture.h" #include "VideoBackends/D3DCommon/Common.h" +#include "VideoCommon/VideoConfig.h" namespace DX11 { @@ -360,10 +361,10 @@ std::unique_ptr DXFramebuffer::Create(DXTexture* color_attachment if (FAILED(hr)) return nullptr; - // Only create the integer RTV on Win8+. + // Only create the integer RTV when logic ops are supported (Win8+). DXGI_FORMAT integer_format = D3DCommon::GetRTVFormatForAbstractFormat(color_attachment->GetFormat(), true); - if (D3D::device1 && integer_format != desc.Format) + if (g_ActiveConfig.backend_info.bSupportsLogicOp && integer_format != desc.Format) { desc.Format = integer_format; hr = D3D::device->CreateRenderTargetView(color_attachment->GetD3DTexture(), &desc, -- cgit v1.2.3