diff --git a/Ryujinx.Graphics/Gal/GalTextureFormat.cs b/Ryujinx.Graphics/Gal/GalTextureFormat.cs index 7e3e65e82f..5ab7be89b2 100644 --- a/Ryujinx.Graphics/Gal/GalTextureFormat.cs +++ b/Ryujinx.Graphics/Gal/GalTextureFormat.cs @@ -9,6 +9,7 @@ namespace Ryujinx.Graphics.Gal R32 = 0xf, BC6H_SF16 = 0x10, BC6H_UF16 = 0x11, + A4B4G4R4 = 0x12, A1B5G5R5 = 0x14, B5G6R5 = 0x15, BC7U = 0x17, diff --git a/Ryujinx.Graphics/Gal/ImageFormatConverter.cs b/Ryujinx.Graphics/Gal/ImageFormatConverter.cs index a79c20f11b..9487136a4d 100644 --- a/Ryujinx.Graphics/Gal/ImageFormatConverter.cs +++ b/Ryujinx.Graphics/Gal/ImageFormatConverter.cs @@ -40,6 +40,7 @@ namespace Ryujinx.Graphics.Gal case GalTextureFormat.R16G16B16A16: return GalImageFormat.R16G16B16A16_UNORM; case GalTextureFormat.A8B8G8R8: return GalImageFormat.A8B8G8R8_UNORM_PACK32; case GalTextureFormat.A2B10G10R10: return GalImageFormat.A2B10G10R10_UNORM_PACK32; + case GalTextureFormat.A4B4G4R4: return GalImageFormat.R4G4B4A4_UNORM_PACK16; case GalTextureFormat.A1B5G5R5: return GalImageFormat.A1R5G5B5_UNORM_PACK16; case GalTextureFormat.B5G6R5: return GalImageFormat.B5G6R5_UNORM_PACK16; case GalTextureFormat.BC7U: return GalImageFormat.BC7_UNORM_BLOCK; @@ -120,7 +121,7 @@ namespace Ryujinx.Graphics.Gal break; } - throw new NotImplementedException(Format.ToString() + " " + Type.ToString()); + throw new NotImplementedException("0x" + Format.ToString("x2") + " " + Type.ToString()); } public static GalImageFormat ConvertFrameBuffer(GalFrameBufferFormat Format) @@ -181,6 +182,7 @@ namespace Ryujinx.Graphics.Gal case GalImageFormat.R32_UINT: case GalImageFormat.BC6H_SFLOAT_BLOCK: case GalImageFormat.BC6H_UFLOAT_BLOCK: + case GalImageFormat.R4G4B4A4_UNORM_PACK16: case GalImageFormat.A1R5G5B5_UNORM_PACK16: case GalImageFormat.B5G6R5_UNORM_PACK16: case GalImageFormat.BC7_UNORM_BLOCK: diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs index 9d7e132385..cf6eaf3911 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs @@ -145,6 +145,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL case GalImageFormat.R32_SFLOAT: return (PixelInternalFormat.R32f, PixelFormat.Red, PixelType.Float); case GalImageFormat.R32_SINT: return (PixelInternalFormat.R32i, PixelFormat.Red, PixelType.Int); case GalImageFormat.R32_UINT: return (PixelInternalFormat.R32ui, PixelFormat.Red, PixelType.UnsignedInt); + case GalImageFormat.R4G4B4A4_UNORM_PACK16: return (PixelInternalFormat.Rgba4, PixelFormat.Rgba, PixelType.UnsignedShort4444Reversed); case GalImageFormat.A1R5G5B5_UNORM_PACK16: return (PixelInternalFormat.Rgb5A1, PixelFormat.Rgba, PixelType.UnsignedShort5551); case GalImageFormat.B5G6R5_UNORM_PACK16: return (PixelInternalFormat.Rgba, PixelFormat.Rgb, PixelType.UnsignedShort565); case GalImageFormat.R16G16_SFLOAT: return (PixelInternalFormat.Rg16f, PixelFormat.Rg, PixelType.HalfFloat); diff --git a/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs b/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs index 7d053360ab..c8e0a12a7b 100644 --- a/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs +++ b/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs @@ -68,6 +68,7 @@ namespace Ryujinx.HLE.Gpu.Texture case GalImageFormat.D24_UNORM_S8_UINT: return Image.Width * Image.Height * 4; + case GalImageFormat.R4G4B4A4_UNORM_PACK16: case GalImageFormat.A1R5G5B5_UNORM_PACK16: case GalImageFormat.B5G6R5_UNORM_PACK16: case GalImageFormat.R8G8_SINT: diff --git a/Ryujinx.HLE/Gpu/Texture/TextureReader.cs b/Ryujinx.HLE/Gpu/Texture/TextureReader.cs index 0cf055db8b..19aa25d74d 100644 --- a/Ryujinx.HLE/Gpu/Texture/TextureReader.cs +++ b/Ryujinx.HLE/Gpu/Texture/TextureReader.cs @@ -19,6 +19,7 @@ namespace Ryujinx.HLE.Gpu.Texture case GalTextureFormat.Z24S8: return Read4Bpp (Memory, Texture); case GalTextureFormat.A1B5G5R5: return Read5551 (Memory, Texture); case GalTextureFormat.B5G6R5: return Read565 (Memory, Texture); + case GalTextureFormat.A4B4G4R4: return Read2Bpp (Memory, Texture); case GalTextureFormat.G8R8: return Read2Bpp (Memory, Texture); case GalTextureFormat.R16: return Read2Bpp (Memory, Texture); case GalTextureFormat.R8: return Read1Bpp (Memory, Texture);