mirror of https://github.com/PCSX2/pcsx2.git
gsdx hw: only enable OI_GsMemClear when both depth/alpha test are disabled
Fix #1262
This commit is contained in:
parent
181d8f52d5
commit
a99750ae87
|
@ -757,9 +757,11 @@ bool GSRendererHW::OI_DoubleHalfClear(GSTexture* rt, GSTexture* ds, GSTextureCac
|
||||||
void GSRendererHW::OI_GsMemClear()
|
void GSRendererHW::OI_GsMemClear()
|
||||||
{
|
{
|
||||||
// Rectangle draw without texture
|
// Rectangle draw without texture
|
||||||
if ((m_vt.m_primclass == GS_SPRITE_CLASS) && (m_vertex.next == 2) && !PRIM->TME && !PRIM->ABE) {
|
if ((m_vt.m_primclass == GS_SPRITE_CLASS) && (m_vertex.next == 2) && !PRIM->TME && !PRIM->ABE // Direct write
|
||||||
// 0 clear
|
&& !m_context->TEST.ATE // no alpha test
|
||||||
if (m_vt.m_eq.rgba == 0xFFFF && m_vt.m_min.c.eq(GSVector4i(0))) {
|
&& (!m_context->TEST.ZTE || m_context->TEST.ZTST == ZTST_ALWAYS) // no depth test
|
||||||
|
&& (m_vt.m_eq.rgba == 0xFFFF && m_vt.m_min.c.eq(GSVector4i(0))) // Constant 0 write
|
||||||
|
) {
|
||||||
GL_INS("OI_GsMemClear");
|
GL_INS("OI_GsMemClear");
|
||||||
GSOffset* off = m_context->offset.fb;
|
GSOffset* off = m_context->offset.fb;
|
||||||
GSVector4i r = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in));
|
GSVector4i r = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in));
|
||||||
|
@ -776,7 +778,6 @@ void GSRendererHW::OI_GsMemClear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OI (others input?/implementation?) hacks replace current draw call
|
// OI (others input?/implementation?) hacks replace current draw call
|
||||||
|
|
Loading…
Reference in New Issue