mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GLES: Correct invalid scissor handling.
Also improves Direct3D 9. See #11444. Per hardware tests, we should correctly not draw in this case.
This commit is contained in:
parent
5ea935f4bf
commit
29b5581416
1 changed files with 11 additions and 4 deletions
|
@ -571,10 +571,17 @@ void ConvertViewportAndScissor(bool useBufferedRendering, float renderWidth, flo
|
|||
// This is a bit of a hack as the render buffer isn't always that size
|
||||
// We always scissor on non-buffered so that clears don't spill outside the frame.
|
||||
out.scissorEnable = true;
|
||||
out.scissorX = renderX + displayOffsetX + scissorX1 * renderWidthFactor;
|
||||
out.scissorY = renderY + displayOffsetY + scissorY1 * renderHeightFactor;
|
||||
out.scissorW = (scissorX2 - scissorX1) * renderWidthFactor;
|
||||
out.scissorH = (scissorY2 - scissorY1) * renderHeightFactor;
|
||||
if (scissorX2 < scissorX1 || scissorY2 < scissorY1) {
|
||||
out.scissorX = 0;
|
||||
out.scissorY = 0;
|
||||
out.scissorW = 0;
|
||||
out.scissorH = 0;
|
||||
} else {
|
||||
out.scissorX = renderX + displayOffsetX + scissorX1 * renderWidthFactor;
|
||||
out.scissorY = renderY + displayOffsetY + scissorY1 * renderHeightFactor;
|
||||
out.scissorW = (scissorX2 - scissorX1) * renderWidthFactor;
|
||||
out.scissorH = (scissorY2 - scissorY1) * renderHeightFactor;
|
||||
}
|
||||
|
||||
int curRTWidth = gstate_c.curRTWidth;
|
||||
int curRTHeight = gstate_c.curRTHeight;
|
||||
|
|
Loading…
Add table
Reference in a new issue