1#include "FormatsWebGPU.h"
3#include "../TextureData.h"
5const WGPUTextureFormat Cogs::TextureFormatsWebGPU[] = {
6 WGPUTextureFormat_Undefined,
10 WGPUTextureFormat_R8Unorm,
11 WGPUTextureFormat_RG8Unorm,
12 WGPUTextureFormat_Undefined,
13 WGPUTextureFormat_RGBA8Unorm,
17 WGPUTextureFormat_Undefined,
18 WGPUTextureFormat_Undefined,
19 WGPUTextureFormat_Undefined,
20 WGPUTextureFormat_Undefined,
24 WGPUTextureFormat_R8Snorm,
25 WGPUTextureFormat_RG8Snorm,
26 WGPUTextureFormat_Undefined,
27 WGPUTextureFormat_RGBA8Snorm,
31 WGPUTextureFormat_Undefined,
32 WGPUTextureFormat_Undefined,
33 WGPUTextureFormat_Undefined,
34 WGPUTextureFormat_Undefined,
38 WGPUTextureFormat_R8Uint,
39 WGPUTextureFormat_RG8Uint,
40 WGPUTextureFormat_Undefined,
41 WGPUTextureFormat_RGBA8Uint,
45 WGPUTextureFormat_R16Uint,
46 WGPUTextureFormat_RG16Uint,
47 WGPUTextureFormat_Undefined,
48 WGPUTextureFormat_RGBA16Uint,
52 WGPUTextureFormat_R32Uint,
53 WGPUTextureFormat_RG32Uint,
54 WGPUTextureFormat_Undefined,
55 WGPUTextureFormat_RGBA32Uint,
59 WGPUTextureFormat_R8Sint,
60 WGPUTextureFormat_RG8Sint,
61 WGPUTextureFormat_Undefined,
62 WGPUTextureFormat_RGBA8Sint,
66 WGPUTextureFormat_R16Sint,
67 WGPUTextureFormat_RG16Sint,
68 WGPUTextureFormat_Undefined,
69 WGPUTextureFormat_RGBA16Sint,
73 WGPUTextureFormat_R32Sint,
74 WGPUTextureFormat_RG32Sint,
75 WGPUTextureFormat_Undefined,
76 WGPUTextureFormat_RGBA32Sint,
80 WGPUTextureFormat_R16Float,
81 WGPUTextureFormat_RG16Float,
82 WGPUTextureFormat_Undefined,
83 WGPUTextureFormat_RGBA16Float,
87 WGPUTextureFormat_R32Float,
88 WGPUTextureFormat_RG32Float,
89 WGPUTextureFormat_Undefined,
90 WGPUTextureFormat_RGBA32Float,
94 WGPUTextureFormat_Depth16Unorm,
95 WGPUTextureFormat_Depth24Plus,
96 WGPUTextureFormat_Depth24PlusStencil8,
97 WGPUTextureFormat_Depth32Float,
98 WGPUTextureFormat_Depth32Float,
99 WGPUTextureFormat_Depth16Unorm,
103 WGPUTextureFormat_Undefined,
104 WGPUTextureFormat_Undefined,
105 WGPUTextureFormat_Undefined,
106 WGPUTextureFormat_Undefined,
110 WGPUTextureFormat_Undefined,
111 WGPUTextureFormat_BGRA8Unorm,
115 WGPUTextureFormat_Undefined,
119 WGPUTextureFormat_Undefined,
120 WGPUTextureFormat_BC1RGBAUnorm,
121 WGPUTextureFormat_BC1RGBAUnormSrgb,
122 WGPUTextureFormat_Undefined,
123 WGPUTextureFormat_BC2RGBAUnorm,
124 WGPUTextureFormat_BC2RGBAUnormSrgb,
125 WGPUTextureFormat_Undefined,
126 WGPUTextureFormat_BC3RGBAUnorm,
127 WGPUTextureFormat_BC3RGBAUnormSrgb,
128 WGPUTextureFormat_Undefined,
129 WGPUTextureFormat_BC4RUnorm,
130 WGPUTextureFormat_BC4RSnorm,
131 WGPUTextureFormat_Undefined,
132 WGPUTextureFormat_BC5RGUnorm,
133 WGPUTextureFormat_BC5RGSnorm,
136 WGPUTextureFormat_Undefined,
137 WGPUTextureFormat_Undefined,
138 WGPUTextureFormat_Undefined,
139 WGPUTextureFormat_Undefined,
142 WGPUTextureFormat_Undefined,
143 WGPUTextureFormat_Undefined,
144 WGPUTextureFormat_Undefined,
145 WGPUTextureFormat_Undefined,
148 WGPUTextureFormat_Undefined,
149 WGPUTextureFormat_Undefined,
150 WGPUTextureFormat_Undefined,
151 WGPUTextureFormat_Undefined,
153 WGPUTextureFormat_Undefined,
154 WGPUTextureFormat_Undefined,
155 WGPUTextureFormat_Undefined,
156 WGPUTextureFormat_Undefined,
159 WGPUTextureFormat_Undefined,
160 WGPUTextureFormat_Undefined,
161 WGPUTextureFormat_Undefined,
162 WGPUTextureFormat_Undefined,
163 WGPUTextureFormat_Undefined,
164 WGPUTextureFormat_Undefined,
165 WGPUTextureFormat_Undefined,
166 WGPUTextureFormat_Undefined,
167 WGPUTextureFormat_Undefined,
168 WGPUTextureFormat_Undefined,
169 WGPUTextureFormat_Undefined,
170 WGPUTextureFormat_Undefined,
171 WGPUTextureFormat_Undefined,
172 WGPUTextureFormat_Undefined,
174 WGPUTextureFormat_Undefined,
175 WGPUTextureFormat_Undefined,
176 WGPUTextureFormat_Undefined,
177 WGPUTextureFormat_Undefined,
178 WGPUTextureFormat_Undefined,
179 WGPUTextureFormat_Undefined,
180 WGPUTextureFormat_Undefined,
181 WGPUTextureFormat_Undefined,
182 WGPUTextureFormat_Undefined,
183 WGPUTextureFormat_Undefined,
184 WGPUTextureFormat_Undefined,
185 WGPUTextureFormat_Undefined,
186 WGPUTextureFormat_Undefined,
187 WGPUTextureFormat_Undefined,
191 WGPUTextureFormat_Undefined,
192 WGPUTextureFormat_RGBA8UnormSrgb,
196 WGPUTextureFormat_Undefined,
197 WGPUTextureFormat_RGB10A2Unorm,
198 WGPUTextureFormat_RGB10A2Uint,
199 WGPUTextureFormat_RG11B10Ufloat,
200 WGPUTextureFormat_Undefined,
201 WGPUTextureFormat_Undefined,
202 WGPUTextureFormat_Undefined,
203 WGPUTextureFormat_RGB9E5Ufloat,
207 WGPUTextureFormat_Undefined,
209 STATIC_ASSERT_MAPPING(Cogs::TextureFormatsWebGPU, (
int)Cogs::TextureFormat::TextureFormat_Size);
211const WGPUVertexFormat Cogs::VertexFormatsWebGPU[] = {
212 WGPUVertexFormat_Undefined,
216 WGPUVertexFormat_Undefined,
217 WGPUVertexFormat_Unorm8x2,
218 WGPUVertexFormat_Undefined,
219 WGPUVertexFormat_Unorm8x4,
223 WGPUVertexFormat_Undefined,
224 WGPUVertexFormat_Unorm16x2,
225 WGPUVertexFormat_Undefined,
226 WGPUVertexFormat_Unorm16x4,
230 WGPUVertexFormat_Undefined,
231 WGPUVertexFormat_Snorm8x2,
232 WGPUVertexFormat_Undefined,
233 WGPUVertexFormat_Snorm8x4,
237 WGPUVertexFormat_Undefined,
238 WGPUVertexFormat_Snorm16x2,
239 WGPUVertexFormat_Undefined,
240 WGPUVertexFormat_Snorm16x4,
244 WGPUVertexFormat_Undefined,
245 WGPUVertexFormat_Uint8x2,
246 WGPUVertexFormat_Undefined,
247 WGPUVertexFormat_Uint8x4,
252 WGPUVertexFormat_Undefined,
253 WGPUVertexFormat_Uint16x2,
254 WGPUVertexFormat_Undefined,
255 WGPUVertexFormat_Uint16x4,
259 WGPUVertexFormat_Uint32,
260 WGPUVertexFormat_Uint32x2,
261 WGPUVertexFormat_Uint32x3,
262 WGPUVertexFormat_Uint32x4,
266 WGPUVertexFormat_Undefined,
267 WGPUVertexFormat_Sint8x2,
268 WGPUVertexFormat_Undefined,
269 WGPUVertexFormat_Sint8x4,
273 WGPUVertexFormat_Undefined,
274 WGPUVertexFormat_Sint16x2,
275 WGPUVertexFormat_Undefined,
276 WGPUVertexFormat_Sint16x4,
280 WGPUVertexFormat_Sint32,
281 WGPUVertexFormat_Sint32x2,
282 WGPUVertexFormat_Sint32x3,
283 WGPUVertexFormat_Sint32x4,
287 WGPUVertexFormat_Undefined,
288 WGPUVertexFormat_Float16x2,
289 WGPUVertexFormat_Undefined,
290 WGPUVertexFormat_Float16x4,
294 WGPUVertexFormat_Float32,
295 WGPUVertexFormat_Float32x2,
296 WGPUVertexFormat_Float32x3,
297 WGPUVertexFormat_Float32x4,
301 WGPUVertexFormat_Undefined,
302 WGPUVertexFormat_Undefined,
303 WGPUVertexFormat_Undefined,
304 WGPUVertexFormat_Undefined,
305 WGPUVertexFormat_Undefined,
306 WGPUVertexFormat_Undefined,
310 WGPUVertexFormat_Undefined,
311 WGPUVertexFormat_Undefined,
312 WGPUVertexFormat_Undefined,
313 WGPUVertexFormat_Undefined,
317 WGPUVertexFormat_Undefined,
318 WGPUVertexFormat_Undefined,
322 WGPUVertexFormat_Undefined,
326 WGPUVertexFormat_Undefined,
327 WGPUVertexFormat_Undefined,
328 WGPUVertexFormat_Undefined,
329 WGPUVertexFormat_Undefined,
330 WGPUVertexFormat_Undefined,
331 WGPUVertexFormat_Undefined,
332 WGPUVertexFormat_Undefined,
333 WGPUVertexFormat_Undefined,
334 WGPUVertexFormat_Undefined,
335 WGPUVertexFormat_Undefined,
336 WGPUVertexFormat_Undefined,
337 WGPUVertexFormat_Undefined,
338 WGPUVertexFormat_Undefined,
339 WGPUVertexFormat_Undefined,
340 WGPUVertexFormat_Undefined,
343 WGPUVertexFormat_Undefined,
344 WGPUVertexFormat_Undefined,
345 WGPUVertexFormat_Undefined,
346 WGPUVertexFormat_Undefined,
349 WGPUVertexFormat_Undefined,
350 WGPUVertexFormat_Undefined,
351 WGPUVertexFormat_Undefined,
352 WGPUVertexFormat_Undefined,
355 WGPUVertexFormat_Undefined,
356 WGPUVertexFormat_Undefined,
357 WGPUVertexFormat_Undefined,
358 WGPUVertexFormat_Undefined,
360 WGPUVertexFormat_Undefined,
361 WGPUVertexFormat_Undefined,
362 WGPUVertexFormat_Undefined,
363 WGPUVertexFormat_Undefined,
366 WGPUVertexFormat_Undefined,
367 WGPUVertexFormat_Undefined,
368 WGPUVertexFormat_Undefined,
369 WGPUVertexFormat_Undefined,
370 WGPUVertexFormat_Undefined,
371 WGPUVertexFormat_Undefined,
372 WGPUVertexFormat_Undefined,
373 WGPUVertexFormat_Undefined,
374 WGPUVertexFormat_Undefined,
375 WGPUVertexFormat_Undefined,
376 WGPUVertexFormat_Undefined,
377 WGPUVertexFormat_Undefined,
378 WGPUVertexFormat_Undefined,
379 WGPUVertexFormat_Undefined,
381 WGPUVertexFormat_Undefined,
382 WGPUVertexFormat_Undefined,
383 WGPUVertexFormat_Undefined,
384 WGPUVertexFormat_Undefined,
385 WGPUVertexFormat_Undefined,
386 WGPUVertexFormat_Undefined,
387 WGPUVertexFormat_Undefined,
388 WGPUVertexFormat_Undefined,
389 WGPUVertexFormat_Undefined,
390 WGPUVertexFormat_Undefined,
391 WGPUVertexFormat_Undefined,
392 WGPUVertexFormat_Undefined,
393 WGPUVertexFormat_Undefined,
394 WGPUVertexFormat_Undefined,
398 WGPUVertexFormat_Undefined,
399 WGPUVertexFormat_Undefined,
403 WGPUVertexFormat_Undefined,
404 WGPUVertexFormat_Undefined,
405 WGPUVertexFormat_Undefined,
406 WGPUVertexFormat_Undefined,
407 WGPUVertexFormat_Undefined,
408 WGPUVertexFormat_Undefined,
409 WGPUVertexFormat_Undefined,
410 WGPUVertexFormat_Undefined,
414 WGPUVertexFormat_Undefined,
416 STATIC_ASSERT_MAPPING(Cogs::VertexFormatsWebGPU, (
int)Cogs::TextureFormat::Format_Size);