wgpu 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,524 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WGPU
4
+ module Native
5
+ SType = enum(
6
+ :invalid, 0x00000000,
7
+ :surface_descriptor_from_metal_layer, 0x00000001,
8
+ :shader_source_wgsl, 0x00000002,
9
+ :surface_descriptor_from_windows_hwnd, 0x00000003,
10
+ :surface_descriptor_from_xlib_window, 0x00000004,
11
+ :surface_descriptor_from_wayland_surface, 0x00000006,
12
+ :surface_descriptor_from_xcb_window, 0x0000000C
13
+ )
14
+
15
+ BackendType = enum(
16
+ :undefined, 0x00000000,
17
+ :null, 0x00000001,
18
+ :webgpu, 0x00000002,
19
+ :d3d11, 0x00000003,
20
+ :d3d12, 0x00000004,
21
+ :metal, 0x00000005,
22
+ :vulkan, 0x00000006,
23
+ :opengl, 0x00000007,
24
+ :opengles, 0x00000008
25
+ )
26
+
27
+ AdapterType = enum(
28
+ :discrete_gpu, 0x00000001,
29
+ :integrated_gpu, 0x00000002,
30
+ :cpu, 0x00000003,
31
+ :unknown, 0x00000004
32
+ )
33
+
34
+ PowerPreference = enum(
35
+ :undefined, 0x00000000,
36
+ :low_power, 0x00000001,
37
+ :high_performance, 0x00000002
38
+ )
39
+
40
+ FeatureLevel = enum(
41
+ :compatibility, 0x00000001,
42
+ :core, 0x00000002
43
+ )
44
+
45
+ RequestAdapterStatus = enum(
46
+ :success, 0x00000001,
47
+ :instance_dropped, 0x00000002,
48
+ :unavailable, 0x00000003,
49
+ :error, 0x00000004
50
+ )
51
+
52
+ RequestDeviceStatus = enum(
53
+ :success, 0x00000001,
54
+ :instance_dropped, 0x00000002,
55
+ :error, 0x00000003
56
+ )
57
+
58
+ BufferMapState = enum(
59
+ :unmapped, 0x00000001,
60
+ :pending, 0x00000002,
61
+ :mapped, 0x00000003
62
+ )
63
+
64
+ MapAsyncStatus = enum(
65
+ :success, 0x00000001,
66
+ :instance_dropped, 0x00000002,
67
+ :error, 0x00000003,
68
+ :aborted, 0x00000004
69
+ )
70
+
71
+ BufferUsage = {
72
+ none: 0x0000000000000000,
73
+ map_read: 0x0000000000000001,
74
+ map_write: 0x0000000000000002,
75
+ copy_src: 0x0000000000000004,
76
+ copy_dst: 0x0000000000000008,
77
+ index: 0x0000000000000010,
78
+ vertex: 0x0000000000000020,
79
+ uniform: 0x0000000000000040,
80
+ storage: 0x0000000000000080,
81
+ indirect: 0x0000000000000100,
82
+ query_resolve: 0x0000000000000200
83
+ }.freeze
84
+
85
+ MapMode = {
86
+ none: 0x0000000000000000,
87
+ read: 0x0000000000000001,
88
+ write: 0x0000000000000002
89
+ }.freeze
90
+
91
+ ShaderStage = {
92
+ none: 0x0000000000000000,
93
+ vertex: 0x0000000000000001,
94
+ fragment: 0x0000000000000002,
95
+ compute: 0x0000000000000004
96
+ }.freeze
97
+
98
+ TextureFormat = enum(
99
+ :undefined, 0x00000000,
100
+ :r8_unorm, 0x00000001,
101
+ :r8_snorm, 0x00000002,
102
+ :r8_uint, 0x00000003,
103
+ :r8_sint, 0x00000004,
104
+ :r16_uint, 0x00000005,
105
+ :r16_sint, 0x00000006,
106
+ :r16_float, 0x00000007,
107
+ :rg8_unorm, 0x00000008,
108
+ :rg8_snorm, 0x00000009,
109
+ :rg8_uint, 0x0000000A,
110
+ :rg8_sint, 0x0000000B,
111
+ :r32_float, 0x0000000C,
112
+ :r32_uint, 0x0000000D,
113
+ :r32_sint, 0x0000000E,
114
+ :rg16_uint, 0x0000000F,
115
+ :rg16_sint, 0x00000010,
116
+ :rg16_float, 0x00000011,
117
+ :rgba8_unorm, 0x00000012,
118
+ :rgba8_unorm_srgb, 0x00000013,
119
+ :rgba8_snorm, 0x00000014,
120
+ :rgba8_uint, 0x00000015,
121
+ :rgba8_sint, 0x00000016,
122
+ :bgra8_unorm, 0x00000017,
123
+ :bgra8_unorm_srgb, 0x00000018,
124
+ :rgb10a2_uint, 0x00000019,
125
+ :rgb10a2_unorm, 0x0000001A,
126
+ :rg11b10_ufloat, 0x0000001B,
127
+ :rgb9e5_ufloat, 0x0000001C,
128
+ :rg32_float, 0x0000001D,
129
+ :rg32_uint, 0x0000001E,
130
+ :rg32_sint, 0x0000001F,
131
+ :rgba16_uint, 0x00000020,
132
+ :rgba16_sint, 0x00000021,
133
+ :rgba16_float, 0x00000022,
134
+ :rgba32_float, 0x00000023,
135
+ :rgba32_uint, 0x00000024,
136
+ :rgba32_sint, 0x00000025,
137
+ :stencil8, 0x00000026,
138
+ :depth16_unorm, 0x00000027,
139
+ :depth24_plus, 0x00000028,
140
+ :depth24_plus_stencil8, 0x00000029,
141
+ :depth32_float, 0x0000002A,
142
+ :depth32_float_stencil8, 0x0000002B,
143
+ :bc1_rgba_unorm, 0x0000002C,
144
+ :bc1_rgba_unorm_srgb, 0x0000002D,
145
+ :bc2_rgba_unorm, 0x0000002E,
146
+ :bc2_rgba_unorm_srgb, 0x0000002F,
147
+ :bc3_rgba_unorm, 0x00000030,
148
+ :bc3_rgba_unorm_srgb, 0x00000031,
149
+ :bc4_r_unorm, 0x00000032,
150
+ :bc4_r_snorm, 0x00000033,
151
+ :bc5_rg_unorm, 0x00000034,
152
+ :bc5_rg_snorm, 0x00000035,
153
+ :bc6h_rgb_ufloat, 0x00000036,
154
+ :bc6h_rgb_float, 0x00000037,
155
+ :bc7_rgba_unorm, 0x00000038,
156
+ :bc7_rgba_unorm_srgb, 0x00000039,
157
+ :etc2_rgb8_unorm, 0x0000003A,
158
+ :etc2_rgb8_unorm_srgb, 0x0000003B,
159
+ :etc2_rgb8a1_unorm, 0x0000003C,
160
+ :etc2_rgb8a1_unorm_srgb, 0x0000003D,
161
+ :etc2_rgba8_unorm, 0x0000003E,
162
+ :etc2_rgba8_unorm_srgb, 0x0000003F,
163
+ :eac_r11_unorm, 0x00000040,
164
+ :eac_r11_snorm, 0x00000041,
165
+ :eac_rg11_unorm, 0x00000042,
166
+ :eac_rg11_snorm, 0x00000043,
167
+ :astc_4x4_unorm, 0x00000044,
168
+ :astc_4x4_unorm_srgb, 0x00000045,
169
+ :astc_5x4_unorm, 0x00000046,
170
+ :astc_5x4_unorm_srgb, 0x00000047,
171
+ :astc_5x5_unorm, 0x00000048,
172
+ :astc_5x5_unorm_srgb, 0x00000049,
173
+ :astc_6x5_unorm, 0x0000004A,
174
+ :astc_6x5_unorm_srgb, 0x0000004B,
175
+ :astc_6x6_unorm, 0x0000004C,
176
+ :astc_6x6_unorm_srgb, 0x0000004D,
177
+ :astc_8x5_unorm, 0x0000004E,
178
+ :astc_8x5_unorm_srgb, 0x0000004F,
179
+ :astc_8x6_unorm, 0x00000050,
180
+ :astc_8x6_unorm_srgb, 0x00000051,
181
+ :astc_8x8_unorm, 0x00000052,
182
+ :astc_8x8_unorm_srgb, 0x00000053,
183
+ :astc_10x5_unorm, 0x00000054,
184
+ :astc_10x5_unorm_srgb, 0x00000055,
185
+ :astc_10x6_unorm, 0x00000056,
186
+ :astc_10x6_unorm_srgb, 0x00000057,
187
+ :astc_10x8_unorm, 0x00000058,
188
+ :astc_10x8_unorm_srgb, 0x00000059,
189
+ :astc_10x10_unorm, 0x0000005A,
190
+ :astc_10x10_unorm_srgb, 0x0000005B,
191
+ :astc_12x10_unorm, 0x0000005C,
192
+ :astc_12x10_unorm_srgb, 0x0000005D,
193
+ :astc_12x12_unorm, 0x0000005E,
194
+ :astc_12x12_unorm_srgb, 0x0000005F
195
+ )
196
+
197
+ PrimitiveTopology = enum(
198
+ :undefined, 0x00000000,
199
+ :point_list, 0x00000001,
200
+ :line_list, 0x00000002,
201
+ :line_strip, 0x00000003,
202
+ :triangle_list, 0x00000004,
203
+ :triangle_strip, 0x00000005
204
+ )
205
+
206
+ LoadOp = enum(
207
+ :undefined, 0x00000000,
208
+ :load, 0x00000001,
209
+ :clear, 0x00000002
210
+ )
211
+
212
+ StoreOp = enum(
213
+ :undefined, 0x00000000,
214
+ :store, 0x00000001,
215
+ :discard, 0x00000002
216
+ )
217
+
218
+ TextureDimension = enum(
219
+ :undefined, 0x00000000,
220
+ :d1, 0x00000001,
221
+ :d2, 0x00000002,
222
+ :d3, 0x00000003
223
+ )
224
+
225
+ TextureUsage = {
226
+ none: 0x0000000000000000,
227
+ copy_src: 0x0000000000000001,
228
+ copy_dst: 0x0000000000000002,
229
+ texture_binding: 0x0000000000000004,
230
+ storage_binding: 0x0000000000000008,
231
+ render_attachment: 0x0000000000000010
232
+ }.freeze
233
+
234
+ VertexFormat = enum(
235
+ :uint8, 0x00000001,
236
+ :uint8x2, 0x00000002,
237
+ :uint8x4, 0x00000003,
238
+ :sint8, 0x00000004,
239
+ :sint8x2, 0x00000005,
240
+ :sint8x4, 0x00000006,
241
+ :unorm8, 0x00000007,
242
+ :unorm8x2, 0x00000008,
243
+ :unorm8x4, 0x00000009,
244
+ :snorm8, 0x0000000A,
245
+ :snorm8x2, 0x0000000B,
246
+ :snorm8x4, 0x0000000C,
247
+ :uint16, 0x0000000D,
248
+ :uint16x2, 0x0000000E,
249
+ :uint16x4, 0x0000000F,
250
+ :sint16, 0x00000010,
251
+ :sint16x2, 0x00000011,
252
+ :sint16x4, 0x00000012,
253
+ :unorm16, 0x00000013,
254
+ :unorm16x2, 0x00000014,
255
+ :unorm16x4, 0x00000015,
256
+ :snorm16, 0x00000016,
257
+ :snorm16x2, 0x00000017,
258
+ :snorm16x4, 0x00000018,
259
+ :float16, 0x00000019,
260
+ :float16x2, 0x0000001A,
261
+ :float16x4, 0x0000001B,
262
+ :float32, 0x0000001C,
263
+ :float32x2, 0x0000001D,
264
+ :float32x3, 0x0000001E,
265
+ :float32x4, 0x0000001F,
266
+ :uint32, 0x00000020,
267
+ :uint32x2, 0x00000021,
268
+ :uint32x3, 0x00000022,
269
+ :uint32x4, 0x00000023,
270
+ :sint32, 0x00000024,
271
+ :sint32x2, 0x00000025,
272
+ :sint32x3, 0x00000026,
273
+ :sint32x4, 0x00000027
274
+ )
275
+
276
+ IndexFormat = enum(
277
+ :undefined, 0x00000000,
278
+ :uint16, 0x00000001,
279
+ :uint32, 0x00000002
280
+ )
281
+
282
+ BufferBindingType = enum(
283
+ :binding_not_used, 0x00000000,
284
+ :undefined, 0x00000001,
285
+ :uniform, 0x00000002,
286
+ :storage, 0x00000003,
287
+ :read_only_storage, 0x00000004
288
+ )
289
+
290
+ SamplerBindingType = enum(
291
+ :binding_not_used, 0x00000000,
292
+ :undefined, 0x00000001,
293
+ :filtering, 0x00000002,
294
+ :non_filtering, 0x00000003,
295
+ :comparison, 0x00000004
296
+ )
297
+
298
+ TextureSampleType = enum(
299
+ :binding_not_used, 0x00000000,
300
+ :undefined, 0x00000001,
301
+ :float, 0x00000002,
302
+ :unfilterable_float, 0x00000003,
303
+ :depth, 0x00000004,
304
+ :sint, 0x00000005,
305
+ :uint, 0x00000006
306
+ )
307
+
308
+ StorageTextureAccess = enum(
309
+ :binding_not_used, 0x00000000,
310
+ :undefined, 0x00000001,
311
+ :write_only, 0x00000002,
312
+ :read_only, 0x00000003,
313
+ :read_write, 0x00000004
314
+ )
315
+
316
+ TextureViewDimension = enum(
317
+ :undefined, 0x00000000,
318
+ :d1, 0x00000001,
319
+ :d2, 0x00000002,
320
+ :d2_array, 0x00000003,
321
+ :cube, 0x00000004,
322
+ :cube_array, 0x00000005,
323
+ :d3, 0x00000006
324
+ )
325
+
326
+ TextureAspect = enum(
327
+ :undefined, 0x00000000,
328
+ :all, 0x00000001,
329
+ :stencil_only, 0x00000002,
330
+ :depth_only, 0x00000003
331
+ )
332
+
333
+ AddressMode = enum(
334
+ :undefined, 0x00000000,
335
+ :clamp_to_edge, 0x00000001,
336
+ :repeat, 0x00000002,
337
+ :mirror_repeat, 0x00000003
338
+ )
339
+
340
+ FilterMode = enum(
341
+ :undefined, 0x00000000,
342
+ :nearest, 0x00000001,
343
+ :linear, 0x00000002
344
+ )
345
+
346
+ MipmapFilterMode = enum(
347
+ :undefined, 0x00000000,
348
+ :nearest, 0x00000001,
349
+ :linear, 0x00000002
350
+ )
351
+
352
+ CompareFunction = enum(
353
+ :undefined, 0x00000000,
354
+ :never, 0x00000001,
355
+ :less, 0x00000002,
356
+ :less_equal, 0x00000003,
357
+ :greater, 0x00000004,
358
+ :greater_equal, 0x00000005,
359
+ :equal, 0x00000006,
360
+ :not_equal, 0x00000007,
361
+ :always, 0x00000008
362
+ )
363
+
364
+ FrontFace = enum(
365
+ :undefined, 0x00000000,
366
+ :ccw, 0x00000001,
367
+ :cw, 0x00000002
368
+ )
369
+
370
+ CullMode = enum(
371
+ :undefined, 0x00000000,
372
+ :none, 0x00000001,
373
+ :front, 0x00000002,
374
+ :back, 0x00000003
375
+ )
376
+
377
+ BlendFactor = enum(
378
+ :undefined, 0x00000000,
379
+ :zero, 0x00000001,
380
+ :one, 0x00000002,
381
+ :src, 0x00000003,
382
+ :one_minus_src, 0x00000004,
383
+ :src_alpha, 0x00000005,
384
+ :one_minus_src_alpha, 0x00000006,
385
+ :dst, 0x00000007,
386
+ :one_minus_dst, 0x00000008,
387
+ :dst_alpha, 0x00000009,
388
+ :one_minus_dst_alpha, 0x0000000A,
389
+ :src_alpha_saturated, 0x0000000B,
390
+ :constant, 0x0000000C,
391
+ :one_minus_constant, 0x0000000D,
392
+ :src1, 0x0000000E,
393
+ :one_minus_src1, 0x0000000F,
394
+ :src1_alpha, 0x00000010,
395
+ :one_minus_src1_alpha, 0x00000011
396
+ )
397
+
398
+ BlendOperation = enum(
399
+ :undefined, 0x00000000,
400
+ :add, 0x00000001,
401
+ :subtract, 0x00000002,
402
+ :reverse_subtract, 0x00000003,
403
+ :min, 0x00000004,
404
+ :max, 0x00000005
405
+ )
406
+
407
+ ColorWriteMask = {
408
+ none: 0x00000000,
409
+ red: 0x00000001,
410
+ green: 0x00000002,
411
+ blue: 0x00000004,
412
+ alpha: 0x00000008,
413
+ all: 0x0000000F
414
+ }.freeze
415
+
416
+ VertexStepMode = enum(
417
+ :undefined, 0x00000000,
418
+ :vertex_buffer_not_used, 0x00000001,
419
+ :vertex, 0x00000002,
420
+ :instance, 0x00000003
421
+ )
422
+
423
+ StencilOperation = enum(
424
+ :undefined, 0x00000000,
425
+ :keep, 0x00000001,
426
+ :zero, 0x00000002,
427
+ :replace, 0x00000003,
428
+ :invert, 0x00000004,
429
+ :increment_clamp, 0x00000005,
430
+ :decrement_clamp, 0x00000006,
431
+ :increment_wrap, 0x00000007,
432
+ :decrement_wrap, 0x00000008
433
+ )
434
+
435
+ PresentMode = enum(
436
+ :undefined, 0x00000000,
437
+ :fifo, 0x00000001,
438
+ :fifo_relaxed, 0x00000002,
439
+ :immediate, 0x00000003,
440
+ :mailbox, 0x00000004
441
+ )
442
+
443
+ CompositeAlphaMode = enum(
444
+ :auto, 0x00000000,
445
+ :opaque, 0x00000001,
446
+ :premultiplied, 0x00000002,
447
+ :unpremultiplied, 0x00000003,
448
+ :inherit, 0x00000004
449
+ )
450
+
451
+ SurfaceGetCurrentTextureStatus = enum(
452
+ :success, 0x00000001,
453
+ :timeout, 0x00000002,
454
+ :outdated, 0x00000003,
455
+ :lost, 0x00000004,
456
+ :error, 0x00000005
457
+ )
458
+
459
+ QueryType = enum(
460
+ :occlusion, 0x00000001,
461
+ :timestamp, 0x00000002
462
+ )
463
+
464
+ ErrorFilter = enum(
465
+ :validation, 0x00000001,
466
+ :out_of_memory, 0x00000002,
467
+ :internal, 0x00000003
468
+ )
469
+
470
+ ErrorType = enum(
471
+ :no_error, 0x00000001,
472
+ :validation, 0x00000002,
473
+ :out_of_memory, 0x00000003,
474
+ :internal, 0x00000004,
475
+ :unknown, 0x00000005
476
+ )
477
+
478
+ PopErrorScopeStatus = enum(
479
+ :success, 0x00000001,
480
+ :callback_cancelled, 0x00000002,
481
+ :error, 0x00000003
482
+ )
483
+
484
+ QueueWorkDoneStatus = enum(
485
+ :success, 0x00000001,
486
+ :instance_dropped, 0x00000002,
487
+ :error, 0x00000003,
488
+ :unknown, 0x00000004
489
+ )
490
+
491
+ CompilationInfoRequestStatus = enum(
492
+ :success, 0x00000001,
493
+ :instance_dropped, 0x00000002,
494
+ :error, 0x00000003,
495
+ :unknown, 0x00000004
496
+ )
497
+
498
+ CompilationMessageType = enum(
499
+ :error, 0x00000001,
500
+ :warning, 0x00000002,
501
+ :info, 0x00000003
502
+ )
503
+
504
+ FeatureName = enum(
505
+ :undefined, 0x00000000,
506
+ :depth_clip_control, 0x00000001,
507
+ :depth32_float_stencil8, 0x00000002,
508
+ :timestamp_query, 0x00000003,
509
+ :texture_compression_bc, 0x00000004,
510
+ :texture_compression_bc_sliced_3d, 0x00000005,
511
+ :texture_compression_etc2, 0x00000006,
512
+ :texture_compression_astc, 0x00000007,
513
+ :texture_compression_astc_sliced_3d, 0x00000008,
514
+ :indirect_first_instance, 0x00000009,
515
+ :shader_f16, 0x0000000A,
516
+ :rg11b10_ufloat_renderable, 0x0000000B,
517
+ :bgra8_unorm_storage, 0x0000000C,
518
+ :float32_filterable, 0x0000000D,
519
+ :float32_blendable, 0x0000000E,
520
+ :clip_distances, 0x0000000F,
521
+ :dual_source_blending, 0x00000010
522
+ )
523
+ end
524
+ end