mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-10-12 02:08:45 +00:00
GS/SW: Fix bbox computation in SW draw().
The bbox was missing right/bottom pixels if they were exactly on a pixel center (exact integer). Removed the extra check for 0 width/height bbox for lines/points since they are no longer needed (the bbox will always be at least 1 pixel now). Appears to only affect the SW rasterizer when the bbox right/bottom end point is a multiple of 16 (SW rasterizer allocates scanlines to threads in blocks of 16).
This commit is contained in:
@@ -345,15 +345,7 @@ void GSRendererSW::Draw()
|
||||
std::memcpy(sd->index, m_index.buff, sizeof(u16) * m_index.tail);
|
||||
|
||||
GSVector4i scissor = context->scissor.in;
|
||||
GSVector4i bbox = GSVector4i(m_vt.m_min.p.floor().upld(m_vt.m_max.p.ceil()));
|
||||
|
||||
// points and lines may have zero area bbox (single line: 0, 0 - 256, 0)
|
||||
|
||||
if (m_vt.m_primclass == GS_POINT_CLASS || m_vt.m_primclass == GS_LINE_CLASS)
|
||||
{
|
||||
if (bbox.x == bbox.z) bbox.z++;
|
||||
if (bbox.y == bbox.w) bbox.w++;
|
||||
}
|
||||
GSVector4i bbox = GSVector4i(m_vt.m_min.p.floor().upld(m_vt.m_max.p.floor())) + GSVector4i(0, 0, 1, 1); // right/bottom should be exclusive so +1
|
||||
|
||||
GSVector4i r = bbox.rintersect(scissor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user