diff --git a/GPU/Software/Clipper.cpp b/GPU/Software/Clipper.cpp index 86142582b9..b462bd5977 100644 --- a/GPU/Software/Clipper.cpp +++ b/GPU/Software/Clipper.cpp @@ -206,7 +206,7 @@ void ProcessRect(const VertexData& v0, const VertexData& v1) VertexData* bottomleft = &buf[2]; VertexData* bottomright = &buf[3]; - // Um. Why is this stuff needed? + // DrawTriangle always culls, so sort out the drawing order. for (int i = 0; i < 4; ++i) { if (buf[i].screenpos.x < topleft->screenpos.x && buf[i].screenpos.y < topleft->screenpos.y) topleft = &buf[i]; diff --git a/GPU/Software/RasterizerRectangle.cpp b/GPU/Software/RasterizerRectangle.cpp index b6697b52c7..db9c5bdcf9 100644 --- a/GPU/Software/RasterizerRectangle.cpp +++ b/GPU/Software/RasterizerRectangle.cpp @@ -237,8 +237,10 @@ bool RectangleFastPath(const VertexData &v0, const VertexData &v1) { bool coord_check = (xdiff == udiff || xdiff == -udiff) && (ydiff == vdiff || ydiff == -vdiff); + // Currently only works for TL/BR, which is the most common but not required. + bool orient_check = xdiff >= 0 && ydiff >= 0; bool state_check = !gstate.isModeClear(); // TODO: Add support for clear modes in Rasterizer::DrawSprite. - if ((coord_check || !gstate.isTextureMapEnabled()) && state_check) { + if ((coord_check || !gstate.isTextureMapEnabled()) && orient_check && state_check) { Rasterizer::DrawSprite(v0, v1); return true; }