Vulkan: Add A8B8G8R8 texture format

Co-authored-by: Stossy11 <stossy11@stossy11.com>
This commit is contained in:
KeatonTheBot
2026-03-04 16:44:53 -06:00
co-authored by Stossy11
parent c2dfc93fa6
commit b4d0f10568
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -149,6 +149,7 @@ namespace Ryujinx.Graphics.GAL
B8G8R8A8Srgb,
B10G10R10A2Unorm,
X8UintD24Unorm,
A8B8G8R8Uint,
}
public static class FormatExtensions
@@ -183,6 +184,7 @@ namespace Ryujinx.Graphics.GAL
case Format.R8G8B8A8Snorm:
case Format.R8G8B8A8Uint:
case Format.R8G8B8A8Sint:
case Format.A8B8G8R8Uint:
case Format.R8G8B8A8Srgb:
case Format.R4G4Unorm:
case Format.R8Uscaled:
@@ -656,6 +658,7 @@ namespace Ryujinx.Graphics.GAL
case Format.R32Uint:
case Format.R8G8Uint:
case Format.R16G16Uint:
case Format.A8B8G8R8Uint:
case Format.R32G32Uint:
case Format.R8G8B8Uint:
case Format.R16G16B16Uint:
@@ -361,6 +361,7 @@ namespace Ryujinx.Graphics.Gpu.Image
A2B10G10R10Sint = (A2B10G10R10 << 21) | (Sint << 27), // 0x1e000000
A2B10G10R10Uscaled = (A2B10G10R10 << 21) | (Uscaled << 27), // 0x2e000000
A2B10G10R10Sscaled = (A2B10G10R10 << 21) | (Sscaled << 27), // 0x36000000
A8B8G8R8Uint = (A8B8G8R8 << 21) | (Uint << 27), // 0x25e00040
}
private static readonly Dictionary<TextureFormat, FormatInfo> _textureFormats = new()
@@ -556,6 +557,7 @@ namespace Ryujinx.Graphics.Gpu.Image
{ VertexAttributeFormat.A2B10G10R10Sint, Format.R10G10B10A2Sint },
{ VertexAttributeFormat.A2B10G10R10Uscaled, Format.R10G10B10A2Uscaled },
{ VertexAttributeFormat.A2B10G10R10Sscaled, Format.R10G10B10A2Sscaled },
{ VertexAttributeFormat.A8B8G8R8Uint, Format.A8B8G8R8Uint },
};
#pragma warning restore IDE0055
@@ -211,6 +211,9 @@ namespace Ryujinx.Graphics.Vulkan
case Format.R16G16B16Uint:
format = VkFormat.R16G16B16A16Uint;
break;
case Format.A8B8G8R8Uint:
format = VkFormat.A8B8G8R8UintPack32;
break;
default:
Logger.Error?.Print(LogClass.Gpu, $"Format {srcFormat} is not supported by the host.");
break;