diff options
| author | BaronKiko <BaronKiko@users.noreply.github.com> | 2019-02-01 01:37:07 +0000 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2019-01-31 22:37:07 -0300 |
| commit | f5b4f6ccc4815cfac1fa3c103d8941a26d152d8a (patch) | |
| tree | d36fec808ddc5bab09466f79b1b172a9946d61d4 /Ryujinx.Graphics/Graphics3d | |
| parent | d191b256a6a1ce457e8bc33826fe4142e5d3de3f (diff) | |
Scissor test fix (#563)
* Handle negative viewport coordinates
* Disable scissor before framebuffer blit
* Comment to explain scissor disable will be reenabled if needed
* Comma and spelling mistake
Diffstat (limited to 'Ryujinx.Graphics/Graphics3d')
| -rw-r--r-- | Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs b/Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs index 7de76cce..749f5fdc 100644 --- a/Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs +++ b/Ryujinx.Graphics/Graphics3d/NvGpuEngine3d.cs @@ -419,7 +419,7 @@ namespace Ryujinx.Graphics.Graphics3d // Once geometry shaders are fixed it should be equal to GalPipelineState.RenderTargetCount when shader loaded, otherwise equal to 1 State.ScissorTestCount = 1; - for (int Index = 0; Index < GalPipelineState.RenderTargetsCount; Index++) + for (int Index = 0; Index < State.ScissorTestCount; Index++) { State.ScissorTestEnabled[Index] = ReadRegisterBool(NvGpuEngine3dReg.ScissorEnable + Index * 4); @@ -438,6 +438,12 @@ namespace Ryujinx.Graphics.Graphics3d if ((int)State.FlipY == -1) { State.ScissorTestY[Index] = ViewportHeight - State.ScissorTestY[Index] - State.ScissorTestHeight[Index]; + + // Handle negative viewpont coordinate + if (State.ScissorTestY[Index] < 0) + { + State.ScissorTestY[Index] = 0; + } } } } |
