diff --git a/Ryujinx.Graphics/Gal/GalImageFormat.cs b/Ryujinx.Graphics/Gal/GalImageFormat.cs index 6fcded4164..4e84067bbb 100644 --- a/Ryujinx.Graphics/Gal/GalImageFormat.cs +++ b/Ryujinx.Graphics/Gal/GalImageFormat.cs @@ -194,5 +194,11 @@ ASTC_12x12_SRGB_BLOCK = 184, ASTC_END = ASTC_12x12_SRGB_BLOCK, + + REVERSED_BEGIN, + + R4G4B4A4_UNORM_PACK16_REVERSED = REVERSED_BEGIN, + + REVERSED_END } } \ No newline at end of file diff --git a/Ryujinx.Graphics/Gal/ImageFormatConverter.cs b/Ryujinx.Graphics/Gal/ImageFormatConverter.cs index 9487136a4d..2d20a8a0e0 100644 --- a/Ryujinx.Graphics/Gal/ImageFormatConverter.cs +++ b/Ryujinx.Graphics/Gal/ImageFormatConverter.cs @@ -40,7 +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.A4B4G4R4: return GalImageFormat.R4G4B4A4_UNORM_PACK16_REVERSED; case GalTextureFormat.A1B5G5R5: return GalImageFormat.A1R5G5B5_UNORM_PACK16; case GalTextureFormat.B5G6R5: return GalImageFormat.B5G6R5_UNORM_PACK16; case GalTextureFormat.BC7U: return GalImageFormat.BC7_UNORM_BLOCK; @@ -182,7 +182,6 @@ 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: @@ -223,6 +222,7 @@ namespace Ryujinx.Graphics.Gal case GalImageFormat.ASTC_8x5_UNORM_BLOCK: case GalImageFormat.ASTC_10x5_UNORM_BLOCK: case GalImageFormat.ASTC_10x6_UNORM_BLOCK: + case GalImageFormat.R4G4B4A4_UNORM_PACK16_REVERSED: return true; case GalImageFormat.D24_UNORM_S8_UINT: diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs index cf6eaf3911..e04a59d444 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs @@ -145,7 +145,6 @@ 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); @@ -167,6 +166,8 @@ namespace Ryujinx.Graphics.Gal.OpenGL case GalImageFormat.R8_UNORM: return (PixelInternalFormat.R8, PixelFormat.Red, PixelType.UnsignedByte); case GalImageFormat.B10G11R11_UFLOAT_PACK32: return (PixelInternalFormat.R11fG11fB10f, PixelFormat.Rgb, PixelType.UnsignedInt10F11F11FRev); + case GalImageFormat.R4G4B4A4_UNORM_PACK16_REVERSED: return (PixelInternalFormat.Rgba4, PixelFormat.Rgba, PixelType.UnsignedShort4444Reversed); + case GalImageFormat.D24_UNORM_S8_UINT: return (PixelInternalFormat.Depth24Stencil8, PixelFormat.DepthStencil, PixelType.UnsignedInt248); case GalImageFormat.D32_SFLOAT: return (PixelInternalFormat.DepthComponent32f, PixelFormat.DepthComponent, PixelType.Float); case GalImageFormat.D16_UNORM: return (PixelInternalFormat.DepthComponent16, PixelFormat.DepthComponent, PixelType.UnsignedShort); diff --git a/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs b/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs index c8e0a12a7b..92b608a952 100644 --- a/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs +++ b/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs @@ -68,7 +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.B4G4R4A4_UNORM_PACK16: case GalImageFormat.A1R5G5B5_UNORM_PACK16: case GalImageFormat.B5G6R5_UNORM_PACK16: case GalImageFormat.R8G8_SINT: