diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/Texture.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Image/Texture.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs index 4203cb00..904c908f 100644 --- a/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -857,9 +857,23 @@ namespace Ryujinx.Graphics.Gpu.Image result = decoded; } - else if (!_context.Capabilities.SupportsR4G4Format && Format == Format.R4G4Unorm) + else if (!_context.Capabilities.SupportsEtc2Compression && Format.IsEtc2()) { - result = PixelConverter.ConvertR4G4ToR4G4B4A4(result); + switch (Format) + { + case Format.Etc2RgbaSrgb: + case Format.Etc2RgbaUnorm: + result = ETC2Decoder.DecodeRgba(result, width, height, depth, levels, layers); + break; + case Format.Etc2RgbPtaSrgb: + case Format.Etc2RgbPtaUnorm: + result = ETC2Decoder.DecodePta(result, width, height, depth, levels, layers); + break; + case Format.Etc2RgbSrgb: + case Format.Etc2RgbUnorm: + result = ETC2Decoder.DecodeRgb(result, width, height, depth, levels, layers); + break; + } } else if (!TextureCompatibility.HostSupportsBcFormat(Format, Target, _context.Capabilities)) { @@ -895,6 +909,10 @@ namespace Ryujinx.Graphics.Gpu.Image break; } } + else if (!_context.Capabilities.SupportsR4G4Format && Format == Format.R4G4Unorm) + { + result = PixelConverter.ConvertR4G4ToR4G4B4A4(result); + } return result; } |