diff options
Diffstat (limited to 'Ryujinx.Graphics.GAL/Format.cs')
-rw-r--r-- | Ryujinx.Graphics.GAL/Format.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Format.cs b/Ryujinx.Graphics.GAL/Format.cs index 8a50f22d..87d08803 100644 --- a/Ryujinx.Graphics.GAL/Format.cs +++ b/Ryujinx.Graphics.GAL/Format.cs @@ -517,6 +517,27 @@ namespace Ryujinx.Graphics.GAL } /// <summary> + /// Checks if the texture format is an ETC2 format. + /// </summary> + /// <param name="format">Texture format</param> + /// <returns>True if the texture format is an ETC2 format, false otherwise</returns> + public static bool IsEtc2(this Format format) + { + switch (format) + { + case Format.Etc2RgbaSrgb: + case Format.Etc2RgbaUnorm: + case Format.Etc2RgbPtaSrgb: + case Format.Etc2RgbPtaUnorm: + case Format.Etc2RgbSrgb: + case Format.Etc2RgbUnorm: + return true; + } + + return false; + } + + /// <summary> /// Checks if the texture format is a BGR format. /// </summary> /// <param name="format">Texture format</param> |