Skip to content

Commit 7988320

Browse files
committed
GS/SW: Early exit optimization for multithreaded horizontal lines.
1 parent f50e8df commit 7988320

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pcsx2/GS/Renderers/SW/GSRasterizer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,10 @@ void GSRasterizer::DrawEdgeLine(const GSVertexSW& v0, const GSVertexSW& v1, cons
527527
const int rxi1 = static_cast<int>(rx1);
528528
const int ryi1 = static_cast<int>(ry1);
529529

530+
// Early exit for horizontal lines.
531+
if (delta_y == 0.0f && !IsOneOfMyScanlines(ryi0))
532+
return;
533+
530534
const GSVertexSW dedge = dv / GSVector4(std::abs(step_x ? delta_x : delta_y));
531535

532536
GSVertexSW edge(v0);

0 commit comments

Comments
 (0)