0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 05:45:47 +00:00

Fix table

This commit is contained in:
Isaac Marovitz 2024-05-19 10:44:08 -04:00 committed by Isaac Marovitz
parent e72c69cf19
commit fe2337d61a

View file

@ -202,26 +202,57 @@ namespace Ryujinx.Graphics.Metal
{ {
return format switch return format switch
{ {
Format.R16Float or Format.R32Float => MTLVertexFormat.Float, Format.R16Float => MTLVertexFormat.Half,
Format.R16G16Float or Format.R32G32Float => MTLVertexFormat.Float2, Format.R16G16Float => MTLVertexFormat.Half2,
Format.R16G16B16Float or Format.R32G32B32Float or Format.R11G11B10Float => MTLVertexFormat.Float3, Format.R16G16B16Float => MTLVertexFormat.Half3,
Format.R16G16B16A16Float or Format.R32G32B32A32Float => MTLVertexFormat.Float4, Format.R16G16B16A16Float => MTLVertexFormat.Half4,
Format.R8Uint or Format.R16Uint or Format.R32Uint => MTLVertexFormat.UInt, Format.R32Float => MTLVertexFormat.Float,
Format.R8G8Uint or Format.R16G16Uint or Format.R32G32Uint => MTLVertexFormat.UInt2, Format.R32G32Float => MTLVertexFormat.Float2,
Format.R8G8B8Uint or Format.R16G16B16Uint or Format.R32G32B32Uint => MTLVertexFormat.UInt3, Format.R32G32B32Float=> MTLVertexFormat.Float3,
Format.R8G8B8A8Uint or Format.R16G16B16A16Uint or Format.R32G32B32A32Uint or Format.R10G10B10A2Uint => MTLVertexFormat.UInt4, Format.R11G11B10Float => MTLVertexFormat.FloatRG11B10,
Format.R8Sint or Format.R16Sint or Format.R32Sint => MTLVertexFormat.Int, Format.R32G32B32A32Float => MTLVertexFormat.Float4,
Format.R8G8Sint or Format.R16G16Sint or Format.R32G32Sint => MTLVertexFormat.Int2, Format.R8Uint => MTLVertexFormat.UChar,
Format.R8G8B8Sint or Format.R16G16B16Sint or Format.R32G32B32Sint => MTLVertexFormat.Int3, Format.R8G8Uint => MTLVertexFormat.UChar2,
Format.R8G8B8A8Sint or Format.R16G16B16A16Sint or Format.R32G32B32A32Sint => MTLVertexFormat.Int4, Format.R8G8B8Uint => MTLVertexFormat.UChar3,
Format.R8Unorm or Format.R16Unorm => MTLVertexFormat.UShortNormalized, Format.R8G8B8A8Uint => MTLVertexFormat.UChar4,
Format.R8G8Unorm or Format.R16G16Unorm => MTLVertexFormat.UShort2Normalized, Format.R16Uint => MTLVertexFormat.UShort,
Format.R8G8B8Unorm or Format.R16G16B16Unorm => MTLVertexFormat.UShort3Normalized, Format.R16G16Uint => MTLVertexFormat.UShort2,
Format.R8G8B8A8Unorm or Format.R16G16B16A16Unorm or Format.R10G10B10A2Unorm => MTLVertexFormat.UShort4Normalized, Format.R16G16B16Uint => MTLVertexFormat.UShort3,
Format.R8Snorm or Format.R16Snorm => MTLVertexFormat.ShortNormalized, Format.R16G16B16A16Uint => MTLVertexFormat.UShort4,
Format.R8G8Snorm or Format.R16G16Snorm => MTLVertexFormat.Short2Normalized, Format.R32Uint => MTLVertexFormat.UInt,
Format.R8G8B8Snorm or Format.R16G16B16Snorm => MTLVertexFormat.Short3Normalized, Format.R32G32Uint => MTLVertexFormat.UInt2,
Format.R8G8B8A8Snorm or Format.R16G16B16A16Snorm or Format.R10G10B10A2Snorm => MTLVertexFormat.Short4Normalized, Format.R32G32B32Uint => MTLVertexFormat.UInt3,
Format.R32G32B32A32Uint => MTLVertexFormat.UInt4,
Format.R8Sint => MTLVertexFormat.Char,
Format.R8G8Sint => MTLVertexFormat.Char2,
Format.R8G8B8Sint => MTLVertexFormat.Char3,
Format.R8G8B8A8Sint => MTLVertexFormat.Char4,
Format.R16Sint => MTLVertexFormat.Short,
Format.R16G16Sint => MTLVertexFormat.Short2,
Format.R16G16B16Sint => MTLVertexFormat.Short3,
Format.R16G16B16A16Sint => MTLVertexFormat.Short4,
Format.R32Sint => MTLVertexFormat.Int,
Format.R32G32Sint => MTLVertexFormat.Int2,
Format.R32G32B32Sint => MTLVertexFormat.Int3,
Format.R32G32B32A32Sint => MTLVertexFormat.Int4,
Format.R8Unorm => MTLVertexFormat.UCharNormalized,
Format.R8G8Unorm => MTLVertexFormat.UChar2Normalized,
Format.R8G8B8Unorm => MTLVertexFormat.UChar3Normalized,
Format.R8G8B8A8Unorm => MTLVertexFormat.UChar4Normalized,
Format.R16Unorm => MTLVertexFormat.UShortNormalized,
Format.R16G16Unorm => MTLVertexFormat.UShort2Normalized,
Format.R16G16B16Unorm => MTLVertexFormat.UShort3Normalized,
Format.R16G16B16A16Unorm => MTLVertexFormat.UShort4Normalized,
Format.R10G10B10A2Unorm => MTLVertexFormat.UInt1010102Normalized,
Format.R8Snorm => MTLVertexFormat.CharNormalized,
Format.R8G8Snorm => MTLVertexFormat.Char2Normalized,
Format.R8G8B8Snorm => MTLVertexFormat.Char3Normalized,
Format.R8G8B8A8Snorm => MTLVertexFormat.Char4Normalized,
Format.R16Snorm => MTLVertexFormat.ShortNormalized,
Format.R16G16Snorm => MTLVertexFormat.Short2Normalized,
Format.R16G16B16Snorm => MTLVertexFormat.Short3Normalized,
Format.R16G16B16A16Snorm => MTLVertexFormat.Short4Normalized,
Format.R10G10B10A2Snorm => MTLVertexFormat.Int1010102Normalized,
_ => LogInvalidAndReturn(format, nameof(Format), MTLVertexFormat.Float4) _ => LogInvalidAndReturn(format, nameof(Format), MTLVertexFormat.Float4)
}; };