From dabfff8b3562f1424526812681bb2beafb560aa0 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Mon, 25 Jan 2021 23:17:42 +0100 Subject: [PATCH] gsdx-hw: Get rid of some extra branches/conditions in DATE selection. --- .../GSdx/Renderers/DX11/GSRendererDX11.cpp | 13 +++---------- .../GSdx/Renderers/OpenGL/GSRendererOGL.cpp | 19 ++++++------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp b/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp index 244c549108..13a022bc14 100644 --- a/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp +++ b/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp @@ -821,17 +821,10 @@ void GSRendererDX11::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sou // Leave the check in to make sure other DATE cases are triggered correctly. // fprintf(stderr, "%d: DATE: Slow with alpha %d-%d not supported\n", s_n, m_vt.m_alpha.min, m_vt.m_alpha.max); } - else + else if (m_accurate_date) { - if (m_accurate_date) - { - // fprintf(stderr, "%d: DATE: Fast AD with alpha %d-%d\n", s_n, m_vt.m_alpha.min, m_vt.m_alpha.max); - DATE_one = true; - } - else - { - // fprintf(stderr, "%d: "DATE: Off AD with alpha %d-%d\n", s_n, m_vt.m_alpha.min, m_vt.m_alpha.max); - } + // fprintf(stderr, "%d: DATE: Fast AD with alpha %d-%d\n", s_n, m_vt.m_alpha.min, m_vt.m_alpha.max); + DATE_one = true; } } else if (!m_om_bsel.wa && !m_context->TEST.ATE) diff --git a/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp b/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp index 3f39951963..22c04afd5e 100644 --- a/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp +++ b/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp @@ -1048,25 +1048,18 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour m_require_full_barrier = true; DATE_GL45 = true; } - else + else if (m_accurate_date) { // Note: Fast level (DATE_one) was removed as it's less accurate. - if (m_accurate_date) + GL_PERF("DATE: Full AD with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max); + if (GLLoader::found_GL_ARB_shader_image_load_store && GLLoader::found_GL_ARB_clear_texture) { - GL_PERF("DATE: Full AD with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max); - if (GLLoader::found_GL_ARB_shader_image_load_store && GLLoader::found_GL_ARB_clear_texture) - { - DATE_GL42 = true; - } - else - { - m_require_full_barrier = true; - DATE_GL45 = true; - } + DATE_GL42 = true; } else { - GL_PERF("DATE: Off AD with alpha %d-%d", m_vt.m_alpha.min, m_vt.m_alpha.max); + m_require_full_barrier = true; + DATE_GL45 = true; } } }