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
This commit is contained in:
gdkchan 2024-08-12 17:45:25 -03:00 committed by GitHub
parent 8d8983049e
commit 4f75e26ec7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 25 deletions

View file

@ -51,7 +51,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
pixelInternalFormat = format.PixelInternalFormat;
}
int levels = Info.GetLevelsClamped();
int levels = Info.Levels;
GL.TextureView(
Handle,
@ -267,7 +267,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
public unsafe PinnedSpan<byte> GetData()
{
int size = 0;
int levels = Info.GetLevelsClamped();
int levels = Info.Levels;
for (int level = 0; level < levels; level++)
{
@ -426,7 +426,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
faces = 6;
}
int levels = Info.GetLevelsClamped();
int levels = Info.Levels;
for (int level = 0; level < levels; level++)
{
@ -716,7 +716,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
int width = Info.Width;
int height = Info.Height;
int depth = Info.Depth;
int levels = Info.GetLevelsClamped();
int levels = Info.Levels;
int offset = 0;