diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-07-26 00:03:40 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-26 00:03:40 -0300 |
| commit | 8dbcae1ff88927dc0734d5f0e24fbf8781d68590 (patch) | |
| tree | d884544af874f385a7a374c8889683db2e4c1ccc /Ryujinx.Graphics.GAL/Format.cs | |
| parent | 2678bf0010166e683364102221b52caebea8747e (diff) | |
Implement BGRA texture support (#1418)
* Implement BGRA texture support
* Missing AppendLine
* Remove empty lines
* Address PR feedback
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> |
