1 #include "vertexformat.h"
2 #include "vertexformat_backend.h"
10 unsigned get_vulkan_attribute_format(VertexAttribute a)
14 case 0x011: return VK_FORMAT_R8_UNORM;
15 case 0x012: return VK_FORMAT_R8G8_UNORM;
16 case 0x013: return VK_FORMAT_R8G8B8_UNORM;
17 case 0x014: return VK_FORMAT_R8G8B8A8_UNORM;
18 case 0x019: return VK_FORMAT_R8_UINT;
19 case 0x01A: return VK_FORMAT_R8G8_UINT;
20 case 0x01B: return VK_FORMAT_R8G8B8_UINT;
21 case 0x01C: return VK_FORMAT_R8G8B8A8_UINT;
22 case 0x021: return VK_FORMAT_R16_UNORM;
23 case 0x022: return VK_FORMAT_R16G16_UNORM;
24 case 0x023: return VK_FORMAT_R16G16B16_UNORM;
25 case 0x024: return VK_FORMAT_R16G16B16A16_UNORM;
26 case 0x029: return VK_FORMAT_R16_UINT;
27 case 0x02A: return VK_FORMAT_R16G16_UINT;
28 case 0x02B: return VK_FORMAT_R16G16B16_UINT;
29 case 0x02C: return VK_FORMAT_R16G16B16A16_UINT;
30 case 0x049: return VK_FORMAT_R32_UINT;
31 case 0x04A: return VK_FORMAT_R32G32_UINT;
32 case 0x04B: return VK_FORMAT_R32G32B32_UINT;
33 case 0x04C: return VK_FORMAT_R32G32B32A32_UINT;
34 case 0x091: return VK_FORMAT_R8_SNORM;
35 case 0x092: return VK_FORMAT_R8G8_SNORM;
36 case 0x093: return VK_FORMAT_R8G8B8_SNORM;
37 case 0x094: return VK_FORMAT_R8G8B8A8_SNORM;
38 case 0x099: return VK_FORMAT_R8_SINT;
39 case 0x09A: return VK_FORMAT_R8G8_SINT;
40 case 0x09B: return VK_FORMAT_R8G8B8_SINT;
41 case 0x09C: return VK_FORMAT_R8G8B8A8_SINT;
42 case 0x0A1: return VK_FORMAT_R16_SNORM;
43 case 0x0A2: return VK_FORMAT_R16G16_SNORM;
44 case 0x0A3: return VK_FORMAT_R16G16B16_SNORM;
45 case 0x0A4: return VK_FORMAT_R16G16B16A16_SNORM;
46 case 0x0A9: return VK_FORMAT_R16_SINT;
47 case 0x0AA: return VK_FORMAT_R16G16_SINT;
48 case 0x0AB: return VK_FORMAT_R16G16B16_SINT;
49 case 0x0AC: return VK_FORMAT_R16G16B16A16_SINT;
50 case 0x0C9: return VK_FORMAT_R32_SINT;
51 case 0x0CA: return VK_FORMAT_R32G32_SINT;
52 case 0x0CB: return VK_FORMAT_R32G32B32_SINT;
53 case 0x0CC: return VK_FORMAT_R32G32B32A32_SINT;
54 case 0x1C1: return VK_FORMAT_R32_SFLOAT;
55 case 0x1C2: return VK_FORMAT_R32G32_SFLOAT;
56 case 0x1C3: return VK_FORMAT_R32G32B32_SFLOAT;
57 case 0x1C4: return VK_FORMAT_R32G32B32A32_SFLOAT;
58 default: throw invalid_argument("get_vulkan_attribute_format");