diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2022-01-31 00:11:43 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-31 00:11:43 -0300 |
| commit | b944941733befdfbae802c29c496fe5125f045e2 (patch) | |
| tree | 91845e890a1aa39eac7969c7af5bdd1f312de983 /Ryujinx.Graphics.Gpu/Engine | |
| parent | 0dddcd012c48618a98db4be53da532f167cd1f8a (diff) | |
Fix bug that could cause depth buffer to be missing after clear (#3067)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs index 1a9aeb44..a65fc908 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs @@ -369,14 +369,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed if (color != null) { - if (clipRegionWidth > color.Width) + if (clipRegionWidth > color.Width / samplesInX) { - clipRegionWidth = color.Width; + clipRegionWidth = color.Width / samplesInX; } - if (clipRegionHeight > color.Height) + if (clipRegionHeight > color.Height / samplesInY) { - clipRegionHeight = color.Height; + clipRegionHeight = color.Height / samplesInY; } } } @@ -400,14 +400,14 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed if (depthStencil != null) { - if (clipRegionWidth > depthStencil.Width) + if (clipRegionWidth > depthStencil.Width / samplesInX) { - clipRegionWidth = depthStencil.Width; + clipRegionWidth = depthStencil.Width / samplesInX; } - if (clipRegionHeight > depthStencil.Height) + if (clipRegionHeight > depthStencil.Height / samplesInY) { - clipRegionHeight = depthStencil.Height; + clipRegionHeight = depthStencil.Height / samplesInY; } } } |
