diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2023-06-03 00:43:00 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-03 03:43:00 +0000 |
| commit | 8a352df3c676e347c267919f2d9a56d75daef348 (patch) | |
| tree | 9c38bf5373e574b1e61a42117b61f508b3736fea /src/Ryujinx.Graphics.Vulkan/FormatTable.cs | |
| parent | c545c598512f57de2d178f78095f8bc7b31f07c3 (diff) | |
Allow BGRA images on Vulkan (#5203)
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan/FormatTable.cs')
| -rw-r--r-- | src/Ryujinx.Graphics.Vulkan/FormatTable.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/FormatTable.cs b/src/Ryujinx.Graphics.Vulkan/FormatTable.cs index a030d8c8..3d70f6f2 100644 --- a/src/Ryujinx.Graphics.Vulkan/FormatTable.cs +++ b/src/Ryujinx.Graphics.Vulkan/FormatTable.cs @@ -169,6 +169,16 @@ namespace Ryujinx.Graphics.Vulkan return _table[(int)format]; } + public static Format ConvertRgba8SrgbToUnorm(Format format) + { + return format switch + { + Format.R8G8B8A8Srgb => Format.R8G8B8A8Unorm, + Format.B8G8R8A8Srgb => Format.B8G8R8A8Unorm, + _ => format + }; + } + public static int GetAttributeFormatSize(VkFormat format) { switch (format) |
