LiteFX 0.3.1.2022
Computer Graphics Engine
rendering_formatters.hpp
1#pragma once
2
3#include "rendering_api.hpp"
4
5using namespace LiteFX::Rendering;
6
7template <>
8struct LITEFX_RENDERING_API fmt::formatter<GraphicsAdapterType> : formatter<string_view> {
9 template <typename FormatContext>
10 auto format(GraphicsAdapterType t, FormatContext& ctx) {
11 string_view name = "Invalid";
12 switch (t) {
13 using enum GraphicsAdapterType;
14 case CPU: name = "CPU"; break;
15 case GPU: name = "GPU"; break;
16 case Other: name = "Other"; break;
17 case None: name = "None"; break;
18 }
19 return formatter<string_view>::format(name, ctx);
20 }
21};
22
23template <>
24struct LITEFX_RENDERING_API fmt::formatter<QueueType> : formatter<string_view> {
25 template <typename FormatContext>
26 auto format(QueueType t, FormatContext& ctx) {
27 Array<String> names;
28
29 if (t == QueueType::None)
30 names.push_back("None");
31 else if(t == QueueType::Other)
32 names.push_back("Other");
33 else
34 {
35 if ((t & QueueType::Compute) == QueueType::Compute)
36 names.push_back("Compute");
37 if ((t & QueueType::Graphics) == QueueType::Graphics)
38 names.push_back("Graphics");
39 if ((t & QueueType::Transfer) == QueueType::Transfer)
40 names.push_back("Transfer");
41 }
42
43 String name = Join(names, " | ");
44 return formatter<string_view>::format(name, ctx);
45 }
46};
47
48template <>
49struct LITEFX_RENDERING_API fmt::formatter<QueuePriority> : formatter<string_view> {
50 template <typename FormatContext>
51 auto format(QueuePriority t, FormatContext& ctx) {
52 String name;
53
54 switch (t) {
55 using enum QueuePriority;
56 default:
57 case Normal: name = "Normal"; break;
58 case High: name = "High"; break;
59 case Realtime: name = "Realtime"; break;
60 }
61
62 return formatter<string_view>::format(name, ctx);
63 }
64};
65
66template <>
67struct LITEFX_RENDERING_API fmt::formatter<Format> : formatter<string_view> {
68 template <typename FormatContext>
69 auto format(Format t, FormatContext& ctx) {
70 string_view name = "Invalid";
71 switch (t) {
72 using enum Format;
73 case R4G4_UNORM: name = "R4G4_UNORM"; break;
74 case R4G4B4A4_UNORM: name = "R4G4B4A4_UNORM"; break;
75 case B4G4R4A4_UNORM: name = "B4G4R4A4_UNORM"; break;
76 case R5G6B5_UNORM: name = "R5G6B5_UNORM"; break;
77 case B5G6R5_UNORM: name = "B5G6R5_UNORM"; break;
78 case R5G5B5A1_UNORM: name = "R5G5B5A1_UNORM"; break;
79 case B5G5R5A1_UNORM: name = "B5G5R5A1_UNORM"; break;
80 case A1R5G5B5_UNORM: name = "A1R5G5B5_UNORM"; break;
81 case R8_UNORM: name = "R8_UNORM"; break;
82 case R8_SNORM: name = "R8_SNORM"; break;
83 case R8_USCALED: name = "R8_USCALED"; break;
84 case R8_SSCALED: name = "R8_SSCALED"; break;
85 case R8_UINT: name = "R8_UINT"; break;
86 case R8_SINT: name = "R8_SINT"; break;
87 case R8_SRGB: name = "R8_SRGB"; break;
88 case R8G8_UNORM: name = "R8G8_UNORM"; break;
89 case R8G8_SNORM: name = "R8G8_SNORM"; break;
90 case R8G8_USCALED: name = "R8G8_USCALED"; break;
91 case R8G8_SSCALED: name = "R8G8_SSCALED"; break;
92 case R8G8_UINT: name = "R8G8_UINT"; break;
93 case R8G8_SINT: name = "R8G8_SINT"; break;
94 case R8G8_SRGB: name = "R8G8_SRGB"; break;
95 case R8G8B8_UNORM: name = "R8G8B8_UNORM"; break;
96 case R8G8B8_SNORM: name = "R8G8B8_SNORM"; break;
97 case R8G8B8_USCALED: name = "R8G8B8_USCALED"; break;
98 case R8G8B8_SSCALED: name = "R8G8B8_SSCALED"; break;
99 case R8G8B8_UINT: name = "R8G8B8_UINT"; break;
100 case R8G8B8_SINT: name = "R8G8B8_SINT"; break;
101 case R8G8B8_SRGB: name = "R8G8B8_SRGB"; break;
102 case B8G8R8_UNORM: name = "B8G8R8_UNORM"; break;
103 case B8G8R8_SNORM: name = "B8G8R8_SNORM"; break;
104 case B8G8R8_USCALED: name = "B8G8R8_USCALED"; break;
105 case B8G8R8_SSCALED: name = "B8G8R8_SSCALED"; break;
106 case B8G8R8_UINT: name = "B8G8R8_UINT"; break;
107 case B8G8R8_SINT: name = "B8G8R8_SINT"; break;
108 case B8G8R8_SRGB: name = "B8G8R8_SRGB"; break;
109 case R8G8B8A8_UNORM: name = "R8G8B8A8_UNORM"; break;
110 case R8G8B8A8_SNORM: name = "R8G8B8A8_SNORM"; break;
111 case R8G8B8A8_USCALED: name = "R8G8B8A8_USCALED"; break;
112 case R8G8B8A8_SSCALED: name = "R8G8B8A8_SSCALED"; break;
113 case R8G8B8A8_UINT: name = "R8G8B8A8_UINT"; break;
114 case R8G8B8A8_SINT: name = "R8G8B8A8_SINT"; break;
115 case R8G8B8A8_SRGB: name = "R8G8B8A8_SRGB"; break;
116 case B8G8R8A8_UNORM: name = "B8G8R8A8_UNORM"; break;
117 case B8G8R8A8_SNORM: name = "B8G8R8A8_SNORM"; break;
118 case B8G8R8A8_USCALED: name = "B8G8R8A8_USCALED"; break;
119 case B8G8R8A8_SSCALED: name = "B8G8R8A8_SSCALED"; break;
120 case B8G8R8A8_UINT: name = "B8G8R8A8_UINT"; break;
121 case B8G8R8A8_SINT: name = "B8G8R8A8_SINT"; break;
122 case B8G8R8A8_SRGB: name = "B8G8R8A8_SRGB"; break;
123 case A8B8G8R8_UNORM: name = "A8B8G8R8_UNORM"; break;
124 case A8B8G8R8_SNORM: name = "A8B8G8R8_SNORM"; break;
125 case A8B8G8R8_USCALED: name = "A8B8G8R8_USCALED"; break;
126 case A8B8G8R8_SSCALED: name = "A8B8G8R8_SSCALED"; break;
127 case A8B8G8R8_UINT: name = "A8B8G8R8_UINT"; break;
128 case A8B8G8R8_SINT: name = "A8B8G8R8_SINT"; break;
129 case A8B8G8R8_SRGB: name = "A8B8G8R8_SRGB"; break;
130 case A2R10G10B10_UNORM: name = "A2R10G10B10_UNORM"; break;
131 case A2R10G10B10_SNORM: name = "A2R10G10B10_SNORM"; break;
132 case A2R10G10B10_USCALED: name = "A2R10G10B10_USCALED"; break;
133 case A2R10G10B10_SSCALED: name = "A2R10G10B10_SSCALED"; break;
134 case A2R10G10B10_UINT: name = "A2R10G10B10_UINT"; break;
135 case A2R10G10B10_SINT: name = "A2R10G10B10_SINT"; break;
136 case A2B10G10R10_UNORM: name = "A2B10G10R10_UNORM"; break;
137 case A2B10G10R10_SNORM: name = "A2B10G10R10_SNORM"; break;
138 case A2B10G10R10_USCALED: name = "A2B10G10R10_USCALED"; break;
139 case A2B10G10R10_SSCALED: name = "A2B10G10R10_SSCALED"; break;
140 case A2B10G10R10_UINT: name = "A2B10G10R10_UINT"; break;
141 case A2B10G10R10_SINT: name = "A2B10G10R10_SINT"; break;
142 case R16_UNORM: name = "R16_UNORM"; break;
143 case R16_SNORM: name = "R16_SNORM"; break;
144 case R16_USCALED: name = "R16_USCALED"; break;
145 case R16_SSCALED: name = "R16_SSCALED"; break;
146 case R16_UINT: name = "R16_UINT"; break;
147 case R16_SINT: name = "R16_SINT"; break;
148 case R16_SFLOAT: name = "R16_SFLOAT"; break;
149 case R16G16_UNORM: name = "R16G16_UNORM"; break;
150 case R16G16_SNORM: name = "R16G16_SNORM"; break;
151 case R16G16_USCALED: name = "R16G16_USCALED"; break;
152 case R16G16_SSCALED: name = "R16G16_SSCALED"; break;
153 case R16G16_UINT: name = "R16G16_UINT"; break;
154 case R16G16_SINT: name = "R16G16_SINT"; break;
155 case R16G16_SFLOAT: name = "R16G16_SFLOAT"; break;
156 case R16G16B16_UNORM: name = "R16G16B16_UNORM"; break;
157 case R16G16B16_SNORM: name = "R16G16B16_SNORM"; break;
158 case R16G16B16_USCALED: name = "R16G16B16_USCALED"; break;
159 case R16G16B16_SSCALED: name = "R16G16B16_SSCALED"; break;
160 case R16G16B16_UINT: name = "R16G16B16_UINT"; break;
161 case R16G16B16_SINT: name = "R16G16B16_SINT"; break;
162 case R16G16B16_SFLOAT: name = "R16G16B16_SFLOAT"; break;
163 case R16G16B16A16_UNORM: name = "R16G16B16A16_UNORM"; break;
164 case R16G16B16A16_SNORM: name = "R16G16B16A16_SNORM"; break;
165 case R16G16B16A16_USCALED: name = "R16G16B16A16_USCALED"; break;
166 case R16G16B16A16_SSCALED: name = "R16G16B16A16_SSCALED"; break;
167 case R16G16B16A16_UINT: name = "R16G16B16A16_UINT"; break;
168 case R16G16B16A16_SINT: name = "R16G16B16A16_SINT"; break;
169 case R16G16B16A16_SFLOAT: name = "R16G16B16A16_SFLOAT"; break;
170 case R32_UINT: name = "R32_UINT"; break;
171 case R32_SINT: name = "R32_SINT"; break;
172 case R32_SFLOAT: name = "R32_SFLOAT"; break;
173 case R32G32_UINT: name = "R32G32_UINT"; break;
174 case R32G32_SINT: name = "R32G32_SINT"; break;
175 case R32G32_SFLOAT: name = "R32G32_SFLOAT"; break;
176 case R32G32B32_UINT: name = "R32G32B32_UINT"; break;
177 case R32G32B32_SINT: name = "R32G32B32_SINT"; break;
178 case R32G32B32_SFLOAT: name = "R32G32B32_SFLOAT"; break;
179 case R32G32B32A32_UINT: name = "R32G32B32A32_UINT"; break;
180 case R32G32B32A32_SINT: name = "R32G32B32A32_SINT"; break;
181 case R32G32B32A32_SFLOAT: name = "R32G32B32A32_SFLOAT"; break;
182 case R64_UINT: name = "R64_UINT"; break;
183 case R64_SINT: name = "R64_SINT"; break;
184 case R64_SFLOAT: name = "R64_SFLOAT"; break;
185 case R64G64_UINT: name = "R64G64_UINT"; break;
186 case R64G64_SINT: name = "R64G64_SINT"; break;
187 case R64G64_SFLOAT: name = "R64G64_SFLOAT"; break;
188 case R64G64B64_UINT: name = "R64G64B64_UINT"; break;
189 case R64G64B64_SINT: name = "R64G64B64_SINT"; break;
190 case R64G64B64_SFLOAT: name = "R64G64B64_SFLOAT"; break;
191 case R64G64B64A64_UINT: name = "R64G64B64A64_UINT"; break;
192 case R64G64B64A64_SINT: name = "R64G64B64A64_SINT"; break;
193 case R64G64B64A64_SFLOAT: name = "R64G64B64A64_SFLOAT"; break;
194 case B10G11R11_UFLOAT: name = "B10G11R11_UFLOAT"; break;
195 case E5B9G9R9_UFLOAT: name = "E5B9G9R9_UFLOAT"; break;
196 case D16_UNORM: name = "D16_UNORM"; break;
197 case X8_D24_UNORM: name = "X8_D24_UNORM"; break;
198 case D32_SFLOAT: name = "D32_SFLOAT"; break;
199 case S8_UINT: name = "S8_UINT"; break;
200 case D16_UNORM_S8_UINT: name = "D16_UNORM_S8_UINT"; break;
201 case D24_UNORM_S8_UINT: name = "D24_UNORM_S8_UINT"; break;
202 case D32_SFLOAT_S8_UINT: name = "D32_SFLOAT_S8_UINT"; break;
203 case BC1_RGB_UNORM: name = "BC1_RGB_UNORM"; break;
204 case BC1_RGB_SRGB: name = "BC1_RGB_SRGB"; break;
205 case BC1_RGBA_UNORM: name = "BC1_RGBA_UNORM"; break;
206 case BC1_RGBA_SRGB: name = "BC1_RGBA_SRGB"; break;
207 case BC2_UNORM: name = "BC2_UNORM"; break;
208 case BC2_SRGB: name = "BC2_SRGB"; break;
209 case BC3_UNORM: name = "BC3_UNORM"; break;
210 case BC3_SRGB: name = "BC3_SRGB"; break;
211 case BC4_UNORM: name = "BC4_UNORM"; break;
212 case BC4_SNORM: name = "BC4_SNORM"; break;
213 case BC5_UNORM: name = "BC5_UNORM"; break;
214 case BC5_SNORM: name = "BC5_SNORM"; break;
215 case BC6H_UFLOAT: name = "BC6H_UFLOAT"; break;
216 case BC6H_SFLOAT: name = "BC6H_SFLOAT"; break;
217 case BC7_UNORM: name = "BC7_UNORM"; break;
218 case BC7_SRGB: name = "BC7_SRGB"; break;
219 case None: name = "None"; break;
220 case Other: name = "Other"; break;
221 }
222 return formatter<string_view>::format(name, ctx);
223 }
224};
225
226template <>
227struct LITEFX_RENDERING_API fmt::formatter<DescriptorType> : formatter<string_view> {
228 template <typename FormatContext>
229 auto format(DescriptorType t, FormatContext& ctx) {
230 string_view name = "Invalid";
231 switch (t) {
232 using enum DescriptorType;
233 case Sampler: name = "Sampler"; break;
234 case ConstantBuffer: name = "ContantBuffer"; break;
235 case StructuredBuffer: name = "StructuredBuffer"; break;
236 case RWStructuredBuffer: name = "RWStructuredBuffer"; break;
237 case Texture: name = "Texture"; break;
238 case RWTexture: name = "RWTexture"; break;
239 case Buffer: name = "Buffer"; break;
240 case RWBuffer: name = "RWBuffer"; break;
241 case ByteAddressBuffer: name = "ByteAddressBuffer"; break;
242 case RWByteAddressBuffer: name = "RWByteAddressBuffer"; break;
243 case InputAttachment: name = "Input Attachment"; break;
244 }
245 return formatter<string_view>::format(name, ctx);
246 }
247};
248
249template <>
250struct LITEFX_RENDERING_API fmt::formatter<BufferType> : formatter<string_view> {
251 template <typename FormatContext>
252 auto format(BufferType t, FormatContext& ctx) {
253 string_view name = "Invalid";
254 switch (t) {
255 using enum BufferType;
256 case Index: name = "Index"; break;
257 case Vertex: name = "Vertex"; break;
258 case Uniform: name = "Uniform"; break;
259 case Storage: name = "Storage"; break;
260 case Texel: name = "Texel"; break;
261 case Other: name = "Other"; break;
262 }
263 return formatter<string_view>::format(name, ctx);
264 }
265};
266
267template <>
268struct LITEFX_RENDERING_API fmt::formatter<BufferUsage> : formatter<string_view> {
269 template <typename FormatContext>
270 auto format(BufferUsage t, FormatContext& ctx) {
271 string_view name = "Invalid";
272 switch (t) {
273 using enum BufferUsage;
274 case Staging: name = "Staging"; break;
275 case Resource: name = "Resource"; break;
276 case Dynamic: name = "Dynamic"; break;
277 case Readback: name = "Readback"; break;
278 }
279 return formatter<string_view>::format(name, ctx);
280 }
281};
282
283template <>
284struct LITEFX_RENDERING_API fmt::formatter<IndexType> : formatter<string_view> {
285 template <typename FormatContext>
286 auto format(IndexType t, FormatContext& ctx) {
287 string_view name = "Invalid";
288 switch (t) {
289 using enum IndexType;
290 case UInt16: name = "UInt16"; break;
291 case UInt32: name = "UInt32"; break;
292 }
293 return formatter<string_view>::format(name, ctx);
294 }
295};
296
297template <>
298struct LITEFX_RENDERING_API fmt::formatter<ShaderStage> : formatter<string_view> {
299 template <typename FormatContext>
300 auto format(ShaderStage t, FormatContext& ctx) {
301 Array<String> names;
302
303 if (t == ShaderStage::Other)
304 names.push_back("Other");
305 else
306 {
307 if ((t & ShaderStage::Vertex) == ShaderStage::Vertex)
308 names.push_back("Vertex");
309 if ((t & ShaderStage::TessellationControl) == ShaderStage::TessellationControl)
310 names.push_back("Tessellation Control");
311 if ((t & ShaderStage::TessellationEvaluation) == ShaderStage::TessellationEvaluation)
312 names.push_back("Tessellation Evaluation");
313 if ((t & ShaderStage::Geometry) == ShaderStage::Geometry)
314 names.push_back("Geometry");
315 if ((t & ShaderStage::Fragment) == ShaderStage::Fragment)
316 names.push_back("Fragment");
317 if ((t & ShaderStage::Compute) == ShaderStage::Compute)
318 names.push_back("Compute");
319 }
320
321 String name = Join(names, " | ");
322 return formatter<string_view>::format(name, ctx);
323 }
324};
325
326template <>
327struct LITEFX_RENDERING_API fmt::formatter<BufferFormat> : formatter<string_view> {
328 template <typename FormatContext>
329 auto format(BufferFormat t, FormatContext& ctx) {
330 Array<String> names;
331
332 switch (::getBufferFormatChannels(t))
333 {
334 case 1:
335 names.push_back("X");
336 break;
337 case 2:
338 names.push_back("XY");
339 break;
340 case 3:
341 names.push_back("XYZ");
342 break;
343 case 4:
344 names.push_back("XYZW");
345 break;
346 default:
347 return formatter<string_view>::format("Invalid", ctx);
348 }
349
350 switch (::getBufferFormatChannelSize(t))
351 {
352 case 8:
353 names.push_back("8");
354 break;
355 case 16:
356 names.push_back("16");
357 break;
358 case 32:
359 names.push_back("32");
360 break;
361 case 64:
362 names.push_back("64");
363 break;
364 default:
365 return formatter<string_view>::format("Invalid", ctx);
366 }
367
368 switch (::getBufferFormatType(t))
369 {
370 case 0x01:
371 names.push_back("F");
372 break;
373 case 0x02:
374 names.push_back("I");
375 break;
376 case 0x04:
377 names.push_back("S");
378 break;
379 default:
380 return formatter<string_view>::format("Invalid", ctx);
381 }
382
383 String name = Join(names);
384 return formatter<string_view>::format(name, ctx);
385 }
386};
387
388template <>
389struct LITEFX_RENDERING_API fmt::formatter<PolygonMode> : formatter<string_view> {
390 template <typename FormatContext>
391 auto format(PolygonMode t, FormatContext& ctx) {
392 string_view name;
393
394 switch (t) {
395 using enum PolygonMode;
396 case Solid: name = "Solid"; break;
397 case Wireframe: name = "Wireframe"; break;
398 case Point: name = "Point"; break;
399 default: name = "Invalid"; break;
400 }
401
402 return formatter<string_view>::format(name, ctx);
403 }
404};
405
406template <>
407struct LITEFX_RENDERING_API fmt::formatter<CullMode> : formatter<string_view> {
408 template <typename FormatContext>
409 auto format(CullMode t, FormatContext& ctx) {
410 string_view name;
411
412 switch (t) {
413 using enum CullMode;
414 case FrontFaces: name = "FrontFaces"; break;
415 case BackFaces: name = "BackFaces"; break;
416 case Both: name = "Both"; break;
417 case Disabled: name = "Disabled"; break;
418 default: name = "Invalid"; break;
419 }
420
421 return formatter<string_view>::format(name, ctx);
422 }
423};
424
425template <>
426struct LITEFX_RENDERING_API fmt::formatter<CullOrder> : formatter<string_view> {
427 template <typename FormatContext>
428 auto format(CullOrder t, FormatContext& ctx) {
429 string_view name;
430
431 switch (t) {
432 using enum CullOrder;
433 case ClockWise: name = "ClockWise"; break;
434 case CounterClockWise: name = "CounterClockWise"; break;
435 default: name = "Invalid"; break;
436 }
437
438 return formatter<string_view>::format(name, ctx);
439 }
440};
441
442template <>
443struct LITEFX_RENDERING_API fmt::formatter<RenderTargetType> : formatter<string_view> {
444 template <typename FormatContext>
445 auto format(RenderTargetType t, FormatContext& ctx) {
446 string_view name;
447
448 switch (t) {
449 using enum RenderTargetType;
450 case Color: name = "Color"; break;
451 case DepthStencil: name = "DepthStencil"; break;
452 case Present: name = "Present"; break;
453 default: name = "Invalid"; break;
454 }
455
456 return formatter<string_view>::format(name, ctx);
457 }
458};
459
460template <>
461struct LITEFX_RENDERING_API fmt::formatter<MultiSamplingLevel> : formatter<string_view> {
462 template <typename FormatContext>
463 auto format(MultiSamplingLevel t, FormatContext& ctx) {
464 string_view name;
465
466 switch (t) {
467 using enum MultiSamplingLevel;
468 case x1: name = "1"; break;
469 case x2: name = "2"; break;
470 case x4: name = "4"; break;
471 case x8: name = "8"; break;
472 case x16: name = "16"; break;
473 case x32: name = "32"; break;
474 case x64: name = "64"; break;
475 default: name = "Invalid"; break;
476 }
477
478 return formatter<string_view>::format(name, ctx);
479 }
480};
481
482template <>
483struct LITEFX_RENDERING_API fmt::formatter<FilterMode> : formatter<string_view> {
484 template <typename FormatContext>
485 auto format(FilterMode t, FormatContext& ctx) {
486 string_view name;
487
488 switch (t) {
489 using enum FilterMode;
490 case Nearest: name = "Nearest"; break;
491 case Linear: name = "Linear"; break;
492 default: name = "Invalid"; break;
493 }
494
495 return formatter<string_view>::format(name, ctx);
496 }
497};
498
499template <>
500struct LITEFX_RENDERING_API fmt::formatter<MipMapMode> : formatter<string_view> {
501 template <typename FormatContext>
502 auto format(MipMapMode t, FormatContext& ctx) {
503 string_view name;
504
505 switch (t) {
506 using enum MipMapMode;
507 case Nearest: name = "Nearest"; break;
508 case Linear: name = "Linear"; break;
509 default: name = "Invalid"; break;
510 }
511
512 return formatter<string_view>::format(name, ctx);
513 }
514};
515
516template <>
517struct LITEFX_RENDERING_API fmt::formatter<BorderMode> : formatter<string_view> {
518 template <typename FormatContext>
519 auto format(BorderMode t, FormatContext& ctx) {
520 string_view name;
521
522 switch (t) {
523 using enum BorderMode;
524 case Repeat: name = "Repeat"; break;
525 case ClampToEdge: name = "ClampToEdge"; break;
526 case ClampToBorder: name = "ClampToBorder"; break;
527 case RepeatMirrored: name = "RepeatMirrored"; break;
528 case ClampToEdgeMirrored: name = "ClampToEdgeMirrored"; break;
529 default: name = "Invalid"; break;
530 }
531
532 return formatter<string_view>::format(name, ctx);
533 }
534};
535
536template <>
537struct LITEFX_RENDERING_API fmt::formatter<AttributeSemantic> : formatter<string_view> {
538 template <typename FormatContext>
539 auto format(AttributeSemantic t, FormatContext& ctx) {
540 string_view name;
541
542 switch (t) {
543 using enum AttributeSemantic;
544 case Binormal: name = "Binormal"; break;
545 case BlendIndices: name = "BlendIndices"; break;
546 case BlendWeight: name = "BlendWeight"; break;
547 case Color: name = "Color"; break;
548 case Normal: name = "Normal"; break;
549 case Position: name = "Position"; break;
550 case TransformedPosition: name = "TransformedPosition"; break;
551 case PointSize: name = "PointSize"; break;
552 case Tangent: name = "Tangent"; break;
553 case TextureCoordinate: name = "TextureCoordinate"; break;
554 default: name = "Unknown"; break;
555 }
556
557 return formatter<string_view>::format(name, ctx);
558 }
559};
Implements the IResource interface.
Definition: containers.hpp:371
uint32_t UInt32
Definition: math.hpp:37
uint16_t UInt16
Definition: math.hpp:35
Definition: dx12.hpp:8
std::string String
Definition: string.hpp:19
std::vector< T > Array
Represents a dynamic array.
Definition: containers.hpp:58
String Join(const TStrings &elements, const String &delimiter="")
Definition: string.hpp:26
Definition: graphics.hpp:11
Definition: app_formatters.hpp:6
auto format(QueueType t, FormatContext &ctx)
Definition: rendering_formatters.hpp:26
auto format(PolygonMode t, FormatContext &ctx)
Definition: rendering_formatters.hpp:391
auto format(QueuePriority t, FormatContext &ctx)
Definition: rendering_formatters.hpp:51
auto format(IndexType t, FormatContext &ctx)
Definition: rendering_formatters.hpp:286
auto format(RenderTargetType t, FormatContext &ctx)
Definition: rendering_formatters.hpp:445
auto format(FilterMode t, FormatContext &ctx)
Definition: rendering_formatters.hpp:485
auto format(BufferType t, FormatContext &ctx)
Definition: rendering_formatters.hpp:252
auto format(BorderMode t, FormatContext &ctx)
Definition: rendering_formatters.hpp:519
auto format(MipMapMode t, FormatContext &ctx)
Definition: rendering_formatters.hpp:502
auto format(DescriptorType t, FormatContext &ctx)
Definition: rendering_formatters.hpp:229
auto format(ShaderStage t, FormatContext &ctx)
Definition: rendering_formatters.hpp:300
auto format(BufferFormat t, FormatContext &ctx)
Definition: rendering_formatters.hpp:329
auto format(MultiSamplingLevel t, FormatContext &ctx)
Definition: rendering_formatters.hpp:463
auto format(AttributeSemantic t, FormatContext &ctx)
Definition: rendering_formatters.hpp:539
auto format(CullOrder t, FormatContext &ctx)
Definition: rendering_formatters.hpp:428
auto format(CullMode t, FormatContext &ctx)
Definition: rendering_formatters.hpp:409
auto format(Format t, FormatContext &ctx)
Definition: rendering_formatters.hpp:69
auto format(BufferUsage t, FormatContext &ctx)
Definition: rendering_formatters.hpp:270
auto format(GraphicsAdapterType t, FormatContext &ctx)
Definition: rendering_formatters.hpp:10