mirror of https://github.com/PCSX2/pcsx2.git
GS: Separate Cd output from Cs blend cases
Fixes white screen inbetween logos in FFX.
This commit is contained in:
parent
154171e01e
commit
4ef2574ae3
|
@ -537,9 +537,13 @@ REG64_(GIFReg, ALPHA)
|
|||
u8 _PAD2[3];
|
||||
REG_END2
|
||||
// opaque => output will be Cs/As/zero
|
||||
__forceinline bool IsOpaque() const { return ((A == B || (C == 2 && FIX == 0)) && D == 0) || (A == 0 && B == D && C == 2 && FIX == 0x80) || (C == 2 && D != 1 && FIX == 0x00); }
|
||||
__forceinline bool IsOpaque(int amin, int amax) const { return ((A == B || amax == 0) && D == 0) || (A == 0 && B == D && amin == 0x80 && amax == 0x80) || (C == 2 && D != 1 && FIX == 0x00); }
|
||||
__forceinline bool IsCd() { return (A == B) && (D == 1); }
|
||||
__forceinline bool IsOpaque() const { return ((A == B || (C == 2 && FIX == 0)) && D == 0) || (A == 0 && B == D && C == 2 && FIX == 0x80); }
|
||||
__forceinline bool IsOpaque(int amin, int amax) const { return ((A == B || amax == 0) && D == 0) || (A == 0 && B == D && amin == 0x80 && amax == 0x80); }
|
||||
__forceinline bool IsCd() const { return (A == B) && (D == 1); }
|
||||
|
||||
// output will be Cd, Cs is discarded
|
||||
__forceinline bool IsCdOutput() const { return (C == 2 && D != 1 && FIX == 0x00); }
|
||||
|
||||
__forceinline bool IsBlack() const { return ((C == 2 && FIX == 0) || (A == 2 && A == B)) && D == 2; }
|
||||
REG_END2
|
||||
|
||||
|
|
|
@ -1692,7 +1692,7 @@ void GSRendererHW::Draw()
|
|||
{
|
||||
// Constant Direct Write without texture/test/blending (aka a GS mem clear)
|
||||
if ((m_vt.m_primclass == GS_SPRITE_CLASS) && !PRIM->TME // Direct write
|
||||
&& (!PRIM->ABE || IsOpaque()) // No transparency
|
||||
&& (!PRIM->ABE || IsOpaque() || m_context->ALPHA.IsCdOutput()) // No transparency
|
||||
&& (m_context->FRAME.FBMSK == 0) // no color mask
|
||||
&& !m_context->TEST.ATE // no alpha test
|
||||
&& (!m_context->TEST.ZTE || m_context->TEST.ZTST == ZTST_ALWAYS) // no depth test
|
||||
|
@ -1844,7 +1844,7 @@ void GSRendererHW::Draw()
|
|||
{
|
||||
// Constant Direct Write without texture/test/blending (aka a GS mem clear)
|
||||
if ((m_vt.m_primclass == GS_SPRITE_CLASS) && !PRIM->TME // Direct write
|
||||
&& (!PRIM->ABE || IsOpaque()) // No transparency
|
||||
&& (!PRIM->ABE || IsOpaque() || m_context->ALPHA.IsCdOutput()) // No transparency
|
||||
&& (m_context->FRAME.FBMSK == 0) // no color mask
|
||||
&& !m_context->TEST.ATE // no alpha test
|
||||
&& (!m_context->TEST.ZTE || m_context->TEST.ZTST == ZTST_ALWAYS) // no depth test
|
||||
|
|
Loading…
Reference in New Issue