mirror of https://github.com/PCSX2/pcsx2.git
GS/HW: Allow reverse primitive gap checking
This commit is contained in:
parent
124ba2a124
commit
222fad315d
|
@ -6165,6 +6165,18 @@ bool GSRendererHW::PrimitiveCoversWithoutGaps()
|
||||||
// Borrowed from MergeSprite().
|
// Borrowed from MergeSprite().
|
||||||
u32 last_pX = v[1].XYZ.X;
|
u32 last_pX = v[1].XYZ.X;
|
||||||
for (u32 i = 2; i < m_vertex.next; i += 2)
|
for (u32 i = 2; i < m_vertex.next; i += 2)
|
||||||
|
{
|
||||||
|
if (v[i].XYZ.X < v[i-2].XYZ.X)
|
||||||
|
{
|
||||||
|
const u32 dpX = v[i + 1].XYZ.X - v[i].XYZ.X;
|
||||||
|
const u32 prev_X = v[i - 2].XYZ.X - m_context->XYOFFSET.OFX;
|
||||||
|
if (dpX != prev_X || v[i].XYZ.X != m_context->XYOFFSET.OFX)
|
||||||
|
{
|
||||||
|
m_primitive_covers_without_gaps = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
const u32 dpX = v[i + 1].XYZ.X - v[i].XYZ.X;
|
const u32 dpX = v[i + 1].XYZ.X - v[i].XYZ.X;
|
||||||
if (dpX != first_dpX || v[i].XYZ.X != last_pX)
|
if (dpX != first_dpX || v[i].XYZ.X != last_pX)
|
||||||
|
@ -6172,6 +6184,7 @@ bool GSRendererHW::PrimitiveCoversWithoutGaps()
|
||||||
m_primitive_covers_without_gaps = false;
|
m_primitive_covers_without_gaps = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
last_pX = v[i + 1].XYZ.X;
|
last_pX = v[i + 1].XYZ.X;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue