mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
softgpu: Avoid some ScreenToDrawing() overhead.
This commit is contained in:
1 parent
30394df775
commit
cdccf06b62
1 file changed
+6
-3
@@ -875,11 +875,14 @@ void DrawTriangleSlice(
|
||||
int w1 = w1_base;
|
||||
int w2 = w2_base;
|
||||
|
||||
for (pprime.x = minX; pprime.x <= maxX; pprime.x +=16,
|
||||
pprime.x = minX;
|
||||
DrawingCoords p = TransformUnit::ScreenToDrawing(pprime);
|
||||
|
||||
for (; pprime.x <= maxX; pprime.x +=16,
|
||||
w0 += orient2dIncX(d12.y)*16,
|
||||
w1 += orient2dIncX(-d02.y)*16,
|
||||
w2 += orient2dIncX(d01.y)*16) {
|
||||
DrawingCoords p = TransformUnit::ScreenToDrawing(pprime);
|
||||
w2 += orient2dIncX(d01.y)*16,
|
||||
p.x = (p.x + 1) & 0x3FF) {
|
||||
|
||||
// If p is on or inside all edges, render pixel
|
||||
// TODO: Should we render if the pixel is both on the left and the right side? (i.e. degenerated triangle)
|
||||
|
||||
Reference in new issue
Block a user