Allow BGRA images on Vulkan (#5203)

This commit is contained in:
gdkchan 2023-06-03 00:43:00 -03:00 committed by GitHub
parent c545c59851
commit 8a352df3c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 58 deletions

View file

@ -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)