From c75b20e37d38e5ed1a185a2a85844348bf3e32ce Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Tue, 23 Nov 2021 18:39:16 +0100 Subject: [PATCH] GS-hw: Also disable Blending when AA1 and ABE or PABE are both set on lines. There's no need to blend them since there is no implementation. --- pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp | 6 +++++- pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp b/pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp index 768a4aea75..8b26b0333e 100644 --- a/pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSRendererDX11.cpp @@ -442,8 +442,12 @@ void GSRendererDX11::EmulateBlending() { // Partial port of OGL SW blending. Currently only works for accumulation and non recursive blend. + // AA1: Don't enable blending on AA1, not yet implemented on hardware mode, + // it requires coverage sample so it's safer to turn it off instead. + const bool aa1 = PRIM->AA1 && (m_vt.m_primclass == GS_LINE_CLASS); + // No blending so early exit - if (!(PRIM->ABE || m_env.PABE.PABE)) + if (aa1 || !(PRIM->ABE || m_env.PABE.PABE)) return; m_om_bsel.abe = 1; diff --git a/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp index 0ca565100c..94bed7d901 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSRendererOGL.cpp @@ -464,8 +464,12 @@ void GSRendererOGL::EmulateBlending(bool& DATE_GL42, bool& DATE_GL45) { GSDeviceOGL* dev = (GSDeviceOGL*)m_dev; + // AA1: Don't enable blending on AA1, not yet implemented on hardware mode, + // it requires coverage sample so it's safer to turn it off instead. + const bool aa1 = PRIM->AA1 && (m_vt.m_primclass == GS_LINE_CLASS); + // No blending so early exit - if (!(PRIM->ABE || m_env.PABE.PABE)) + if (aa1 || !(PRIM->ABE || m_env.PABE.PABE)) { dev->OMSetBlendState(); return;