softgpu: Correct off-by-one scissor mask.

Fixes Brave Story in the software renderer.  Was overwriting display list
data in the stride gap.
This commit is contained in:
Unknown W. Brackets 2022-01-01 15:57:26 -08:00
parent b35ca3d472
commit d41e42d247

View File

@ -759,7 +759,7 @@ void DrawTriangleSlice(
// TODO: Maybe we can clip the edges instead?
int scissorYPlus1 = curY + 16 > maxY ? -1 : 0;
Vec4<int> scissor_mask = Vec4<int>(0, maxX - minX, scissorYPlus1, (maxX - minX) | scissorYPlus1);
Vec4<int> scissor_mask = Vec4<int>(0, maxX - minX - 16, scissorYPlus1, (maxX - minX - 16) | scissorYPlus1);
Vec4<int> scissor_step = Vec4<int>(0, -32, 0, -32);
DrawingCoords p = TransformUnit::ScreenToDrawing(ScreenCoords(minX, curY, 0));