diff options
| author | Silent <zdanio95@gmail.com> | 2019-07-21 17:10:51 +0200 |
|---|---|---|
| committer | Silent <zdanio95@gmail.com> | 2019-07-29 16:47:39 +0200 |
| commit | ff00873610a3cd55e76245ef0aae892026fedd9b (patch) | |
| tree | 0a76d85f6d6a6302ce40b889443cbf6f58f6973b /Source/Core/VideoBackends/D3D/DXTexture.cpp | |
| parent | a6b8e8b9c35ceedfa64758c1de3b1d4f64a98061 (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/DXTexture.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/DXTexture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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> 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, |
