Merge pull request #12699 from unknownbrackets/softgpu-minor

softgpu: Correct clear/solid rect BR corner
This commit is contained in:
Henrik Rydgård 2020-03-10 07:34:15 +01:00 committed by GitHub
commit 01165e7277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -1439,9 +1439,9 @@ void ClearRectangle(const VertexData &v0, const VertexData &v1)
DrawingCoords scissorTL(gstate.getScissorX1(), gstate.getScissorY1(), 0);
DrawingCoords scissorBR(gstate.getScissorX2(), gstate.getScissorY2(), 0);
minX = std::max(minX, (int)TransformUnit::DrawingToScreen(scissorTL).x);
maxX = std::max(0, std::min(maxX, (int)TransformUnit::DrawingToScreen(scissorBR).x));
maxX = std::max(0, std::min(maxX, (int)TransformUnit::DrawingToScreen(scissorBR).x + 16));
minY = std::max(minY, (int)TransformUnit::DrawingToScreen(scissorTL).y);
maxY = std::max(0, std::min(maxY, (int)TransformUnit::DrawingToScreen(scissorBR).y));
maxY = std::max(0, std::min(maxY, (int)TransformUnit::DrawingToScreen(scissorBR).y + 16));
const int w = (maxX - minX) / 16;
if (w <= 0)

View File

@ -184,8 +184,8 @@ void DrawSprite(const VertexData& v0, const VertexData& v1) {
}
}
} else {
if (pos1.x > scissorBR.x) pos1.x = scissorBR.x;
if (pos1.y > scissorBR.y) pos1.y = scissorBR.y;
if (pos1.x > scissorBR.x) pos1.x = scissorBR.x + 1;
if (pos1.y > scissorBR.y) pos1.y = scissorBR.y + 1;
if (pos0.x < scissorTL.x) pos0.x = scissorTL.x;
if (pos0.y < scissorTL.y) pos0.y = scissorTL.y;
if (!gstate.isStencilTestEnabled() &&