GS-hw: Disable Z writes on AA1 flag when prim are lines.

When AA1 flag is enabled Z is not written on lines since coverage is always less than 0x80.
This commit is contained in:
lightningterror 2021-11-23 12:29:38 +01:00
parent c10603d161
commit dcd1f90ae7
2 changed files with 4 additions and 2 deletions

View File

@ -108,7 +108,8 @@ void GSRendererDX11::EmulateZbuffer()
if (m_context->TEST.ZTE)
{
m_om_dssel.ztst = m_context->TEST.ZTST;
m_om_dssel.zwe = !m_context->ZBUF.ZMSK;
// AA1: Z is not written on lines since coverage is always less than 0x80.
m_om_dssel.zwe = (m_context->ZBUF.ZMSK || (PRIM->AA1 && m_vt.m_primclass == GS_LINE_CLASS)) ? 0 : 1;
}
else
{

View File

@ -122,7 +122,8 @@ void GSRendererOGL::EmulateZbuffer()
if (m_context->TEST.ZTE)
{
m_om_dssel.ztst = m_context->TEST.ZTST;
m_om_dssel.zwe = !m_context->ZBUF.ZMSK;
// AA1: Z is not written on lines since coverage is always less than 0x80.
m_om_dssel.zwe = (m_context->ZBUF.ZMSK || (PRIM->AA1 && m_vt.m_primclass == GS_LINE_CLASS)) ? 0 : 1;
}
else
{