From 248ad14b04f3dd645bc6e3ba2d84d19fa4c148fe Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 4 Sep 2018 21:43:15 -0300 Subject: [PATCH] Fixups --- Ryujinx.Graphics/Gal/GalImageFormat.cs | 2 +- Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs | 4 +++- Ryujinx.Graphics/Texture/ImageTable.cs | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Ryujinx.Graphics/Gal/GalImageFormat.cs b/Ryujinx.Graphics/Gal/GalImageFormat.cs index 9a29c26608..94c45bb803 100644 --- a/Ryujinx.Graphics/Gal/GalImageFormat.cs +++ b/Ryujinx.Graphics/Gal/GalImageFormat.cs @@ -17,7 +17,7 @@ namespace Ryujinx.Graphics.Gal ASTC_BEGIN = ASTC_4x4, - ASTC_4x4 = 0, + ASTC_4x4 = 1, ASTC_5x4, ASTC_5x5, ASTC_6x5, diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs index e4e52261c0..ad3ab2a945 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs @@ -55,7 +55,9 @@ namespace Ryujinx.Graphics.Gal.OpenGL } else { - if (Image.Format >= GalImageFormat.ASTC_BEGIN && Image.Format <= GalImageFormat.ASTC_END) + GalImageFormat TypeLess = Image.Format & GalImageFormat.FormatMask; + + if (TypeLess >= GalImageFormat.ASTC_BEGIN && TypeLess <= GalImageFormat.ASTC_END) { int TextureBlockWidth = GetAstcBlockWidth(Image.Format); int TextureBlockHeight = GetAstcBlockHeight(Image.Format); diff --git a/Ryujinx.Graphics/Texture/ImageTable.cs b/Ryujinx.Graphics/Texture/ImageTable.cs index bdc4467b5d..dece1aeca3 100644 --- a/Ryujinx.Graphics/Texture/ImageTable.cs +++ b/Ryujinx.Graphics/Texture/ImageTable.cs @@ -206,6 +206,7 @@ namespace Ryujinx.Graphics.Texture return Image.Width * Image.Height * 8; case GalImageFormat.A8B8G8R8: + case GalImageFormat.A8B8G8R8_SRGB: case GalImageFormat.A2B10G10R10: case GalImageFormat.R16G16: case GalImageFormat.R32: