diff options
Diffstat (limited to 'Ryujinx.Graphics.GAL/Format.cs')
| -rw-r--r-- | Ryujinx.Graphics.GAL/Format.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Format.cs b/Ryujinx.Graphics.GAL/Format.cs index 19939c38..a6667361 100644 --- a/Ryujinx.Graphics.GAL/Format.cs +++ b/Ryujinx.Graphics.GAL/Format.cs @@ -231,6 +231,25 @@ namespace Ryujinx.Graphics.GAL } /// <summary> + /// Checks if the texture format is a BGRA format with 8-bit components. + /// </summary> + /// <param name="format">Texture format</param> + /// <returns>True if the texture format is a BGRA format with 8-bit components, false otherwise</returns> + public static bool IsBgra8(this Format format) + { + switch (format) + { + case Format.B8G8R8X8Unorm: + case Format.B8G8R8A8Unorm: + case Format.B8G8R8X8Srgb: + case Format.B8G8R8A8Srgb: + return true; + } + + return false; + } + + /// <summary> /// Checks if the texture format is a depth, stencil or depth-stencil format. /// </summary> /// <param name="format">Texture format</param> |
