diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2024-08-12 17:45:25 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-12 17:45:25 -0300 |
| commit | 4f75e26ec7e61e606f812bd0149eef69bdc8a4ea (patch) | |
| tree | d168984a627c9303b10da7b5b3157e6597502e7e /src/Ryujinx.Graphics.GAL | |
| parent | 8d8983049ea23af0600e077b6389e2cd5de74c38 (diff) | |
Clamp amount of mipmap levels to max allowed for all backends (#7197)
* Clamp amount of mipmap levels to max allowed for all backends
* XML docs
* Remove using
Diffstat (limited to 'src/Ryujinx.Graphics.GAL')
| -rw-r--r-- | src/Ryujinx.Graphics.GAL/TextureCreateInfo.cs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/Ryujinx.Graphics.GAL/TextureCreateInfo.cs b/src/Ryujinx.Graphics.GAL/TextureCreateInfo.cs index 44090291..79c84db0 100644 --- a/src/Ryujinx.Graphics.GAL/TextureCreateInfo.cs +++ b/src/Ryujinx.Graphics.GAL/TextureCreateInfo.cs @@ -1,6 +1,5 @@ using Ryujinx.Common; using System; -using System.Numerics; namespace Ryujinx.Graphics.GAL { @@ -113,25 +112,6 @@ namespace Ryujinx.Graphics.GAL return 1; } - public int GetLevelsClamped() - { - int maxSize = Width; - - if (Target != Target.Texture1D && - Target != Target.Texture1DArray) - { - maxSize = Math.Max(maxSize, Height); - } - - if (Target == Target.Texture3D) - { - maxSize = Math.Max(maxSize, Depth); - } - - int maxLevels = BitOperations.Log2((uint)maxSize) + 1; - return Math.Min(Levels, maxLevels); - } - private static int GetLevelSize(int size, int level) { return Math.Max(1, size >> level); |
