14 return vk::Format::eUndefined;
19 if (input.
bit_width == 8 *
sizeof(
float)) {
22 return vk::Format::eR32Sfloat;
24 return vk::Format::eR32G32Sfloat;
26 return vk::Format::eR32G32B32Sfloat;
28 return vk::Format::eR32G32B32A32Sfloat;
31 return vk::Format::eUndefined;
34 if (input.
bit_width == 8 *
sizeof(
float) / 2) {
37 return vk::Format::eR16Sfloat;
39 return vk::Format::eR16G16Sfloat;
41 return vk::Format::eR16G16B16Sfloat;
43 return vk::Format::eR16G16B16A16Sfloat;
46 return vk::Format::eUndefined;
50 return vk::Format::eUndefined;
54 return vk::Format::eR8Uint;
56 return vk::Format::eUndefined;
59 if (input.
bit_width == 8 *
sizeof(
char)) {
62 return vk::Format::eR8Sint;
64 return vk::Format::eR8G8Sint;
66 return vk::Format::eR8G8B8Sint;
68 return vk::Format::eR8G8B8A8Sint;
71 return vk::Format::eUndefined;
74 if (input.
bit_width == 8 *
sizeof(
char)) {
77 return vk::Format::eR8Uint;
79 return vk::Format::eR8G8Uint;
81 return vk::Format::eR8G8B8Uint;
83 return vk::Format::eR8G8B8A8Uint;
86 return vk::Format::eUndefined;
89 if (input.
bit_width == 8 *
sizeof(int16_t)) {
92 return vk::Format::eR16Sint;
94 return vk::Format::eR16G16Sint;
96 return vk::Format::eR16G16B16Sint;
98 return vk::Format::eR16G16B16A16Sint;
101 return vk::Format::eUndefined;
104 if (input.
bit_width == 8 *
sizeof(uint16_t)) {
107 return vk::Format::eR16Uint;
109 return vk::Format::eR16G16Uint;
111 return vk::Format::eR16G16B16Uint;
113 return vk::Format::eR16G16B16A16Uint;
116 return vk::Format::eUndefined;
119 if (input.
bit_width == 8 *
sizeof(int32_t)) {
122 return vk::Format::eR32Sint;
124 return vk::Format::eR32G32Sint;
126 return vk::Format::eR32G32B32Sint;
128 return vk::Format::eR32G32B32A32Sint;
131 return vk::Format::eUndefined;
134 if (input.
bit_width == 8 *
sizeof(uint32_t)) {
137 return vk::Format::eR32Uint;
139 return vk::Format::eR32G32Uint;
141 return vk::Format::eR32G32B32Uint;
143 return vk::Format::eR32G32B32A32Uint;
146 return vk::Format::eUndefined;
150 return vk::Format::eUndefined;
154 return vk::Format::eUndefined;
163 return vk::Format::eUndefined;
vk::Format ToVertexDescriptorFormat(const ShaderStageIOSlot &input)
def Format(template, **parameters)