diff options
Diffstat (limited to 'Ryujinx.Graphics.GAL/Format.cs')
| -rw-r--r-- | Ryujinx.Graphics.GAL/Format.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Format.cs b/Ryujinx.Graphics.GAL/Format.cs index a4e434b1..10b754ea 100644 --- a/Ryujinx.Graphics.GAL/Format.cs +++ b/Ryujinx.Graphics.GAL/Format.cs @@ -341,5 +341,25 @@ namespace Ryujinx.Graphics.GAL { return format.IsUint() || format.IsSint(); } + + /// <summary> + /// Checks if the texture format is a BC4 compressed format. + /// </summary> + /// <param name="format">Texture format</param> + /// <returns>True if the texture format is a BC4 compressed format, false otherwise</returns> + public static bool IsBc4(this Format format) + { + return format == Format.Bc4Unorm || format == Format.Bc4Snorm; + } + + /// <summary> + /// Checks if the texture format is a BC5 compressed format. + /// </summary> + /// <param name="format">Texture format</param> + /// <returns>True if the texture format is a BC5 compressed format, false otherwise</returns> + public static bool IsBc5(this Format format) + { + return format == Format.Bc5Unorm || format == Format.Bc5Snorm; + } } }
\ No newline at end of file |
