-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathimports.h
More file actions
3130 lines (2394 loc) · 163 KB
/
Copy pathimports.h
File metadata and controls
3130 lines (2394 loc) · 163 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Generated by `wit-bindgen` 0.43.0. DO NOT EDIT!
#ifndef __BINDINGS_IMPORTS_H
#define __BINDINGS_IMPORTS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
typedef struct imports_string_t {
uint8_t*ptr;
size_t len;
} imports_string_t;
typedef struct webgpu_headers_poll_own_pollable_t {
int32_t __handle;
} webgpu_headers_poll_own_pollable_t;
typedef struct webgpu_headers_poll_borrow_pollable_t {
int32_t __handle;
} webgpu_headers_poll_borrow_pollable_t;
typedef struct {
webgpu_headers_poll_borrow_pollable_t *ptr;
size_t len;
} webgpu_headers_poll_list_borrow_pollable_t;
typedef struct {
uint32_t *ptr;
size_t len;
} imports_list_u32_t;
typedef struct wasi_graphics_context_graphics_context_own_context_t {
int32_t __handle;
} wasi_graphics_context_graphics_context_own_context_t;
typedef struct wasi_graphics_context_graphics_context_borrow_context_t {
int32_t __handle;
} wasi_graphics_context_graphics_context_borrow_context_t;
typedef struct wasi_graphics_context_graphics_context_own_abstract_buffer_t {
int32_t __handle;
} wasi_graphics_context_graphics_context_own_abstract_buffer_t;
typedef struct wasi_graphics_context_graphics_context_borrow_abstract_buffer_t {
int32_t __handle;
} wasi_graphics_context_graphics_context_borrow_abstract_buffer_t;
typedef struct wasi_webgpu_webgpu_own_gpu_supported_limits_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_supported_limits_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_supported_limits_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_supported_limits_t;
typedef struct wasi_webgpu_webgpu_own_gpu_supported_features_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_supported_features_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_supported_features_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_supported_features_t;
typedef struct wasi_webgpu_webgpu_own_wgsl_language_features_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_wgsl_language_features_t;
typedef struct wasi_webgpu_webgpu_borrow_wgsl_language_features_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_wgsl_language_features_t;
typedef struct wasi_webgpu_webgpu_own_gpu_adapter_info_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_adapter_info_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_adapter_info_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_adapter_info_t;
typedef struct wasi_webgpu_webgpu_own_gpu_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_power_preference_t;
#define WASI_WEBGPU_WEBGPU_GPU_POWER_PREFERENCE_LOW_POWER 0
#define WASI_WEBGPU_WEBGPU_GPU_POWER_PREFERENCE_HIGH_PERFORMANCE 1
typedef struct {
bool is_some;
imports_string_t val;
} imports_option_string_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_power_preference_t val;
} wasi_webgpu_webgpu_option_gpu_power_preference_t;
typedef struct {
bool is_some;
bool val;
} imports_option_bool_t;
typedef struct wasi_webgpu_webgpu_gpu_request_adapter_options_t {
imports_option_string_t feature_level;
wasi_webgpu_webgpu_option_gpu_power_preference_t power_preference;
imports_option_bool_t force_fallback_adapter;
imports_option_bool_t xr_compatible;
} wasi_webgpu_webgpu_gpu_request_adapter_options_t;
typedef struct wasi_webgpu_webgpu_own_gpu_adapter_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_adapter_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_adapter_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_adapter_t;
typedef struct wasi_webgpu_webgpu_own_record_option_gpu_size64_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_record_option_gpu_size64_t;
typedef struct wasi_webgpu_webgpu_borrow_record_option_gpu_size64_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_record_option_gpu_size64_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_feature_name_t;
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_DEPTH_CLIP_CONTROL 0
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_DEPTH32FLOAT_STENCIL8 1
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_TEXTURE_COMPRESSION_BC 2
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_TEXTURE_COMPRESSION_BC_SLICED3D 3
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_TEXTURE_COMPRESSION_ETC2 4
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_TEXTURE_COMPRESSION_ASTC 5
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_TEXTURE_COMPRESSION_ASTC_SLICED3D 6
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_TIMESTAMP_QUERY 7
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_INDIRECT_FIRST_INSTANCE 8
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_SHADER_F16 9
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_RG11B10UFLOAT_RENDERABLE 10
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_BGRA8UNORM_STORAGE 11
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_FLOAT32_FILTERABLE 12
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_FLOAT32_BLENDABLE 13
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_CLIP_DISTANCES 14
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_DUAL_SOURCE_BLENDING 15
#define WASI_WEBGPU_WEBGPU_GPU_FEATURE_NAME_SUBGROUPS 16
typedef struct wasi_webgpu_webgpu_own_gpu_device_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_device_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_device_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_device_t;
typedef struct wasi_webgpu_webgpu_own_gpu_buffer_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_buffer_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_buffer_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_buffer_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_buffer_map_state_t;
#define WASI_WEBGPU_WEBGPU_GPU_BUFFER_MAP_STATE_UNMAPPED 0
#define WASI_WEBGPU_WEBGPU_GPU_BUFFER_MAP_STATE_PENDING 1
#define WASI_WEBGPU_WEBGPU_GPU_BUFFER_MAP_STATE_MAPPED 2
typedef uint32_t wasi_webgpu_webgpu_gpu_buffer_usage_flags_t;
typedef struct wasi_webgpu_webgpu_own_gpu_buffer_usage_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_buffer_usage_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_buffer_usage_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_buffer_usage_t;
typedef uint32_t wasi_webgpu_webgpu_gpu_map_mode_flags_t;
typedef struct wasi_webgpu_webgpu_own_gpu_map_mode_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_map_mode_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_map_mode_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_map_mode_t;
typedef struct wasi_webgpu_webgpu_own_gpu_texture_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_texture_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_texture_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_texture_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_texture_dimension_t;
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_DIMENSION_D1 0
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_DIMENSION_D2 1
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_DIMENSION_D3 2
typedef uint32_t wasi_webgpu_webgpu_gpu_texture_usage_flags_t;
typedef struct wasi_webgpu_webgpu_own_gpu_texture_usage_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_texture_usage_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_texture_usage_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_texture_usage_t;
typedef struct wasi_webgpu_webgpu_own_gpu_texture_view_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_texture_view_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_texture_view_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_texture_view_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_texture_view_dimension_t;
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_VIEW_DIMENSION_D1 0
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_VIEW_DIMENSION_D2 1
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_VIEW_DIMENSION_D2_ARRAY 2
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_VIEW_DIMENSION_CUBE 3
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_VIEW_DIMENSION_CUBE_ARRAY 4
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_VIEW_DIMENSION_D3 5
typedef uint8_t wasi_webgpu_webgpu_gpu_texture_aspect_t;
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_ASPECT_ALL 0
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_ASPECT_STENCIL_ONLY 1
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_ASPECT_DEPTH_ONLY 2
typedef uint8_t wasi_webgpu_webgpu_gpu_texture_format_t;
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R8UNORM 0
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R8SNORM 1
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R8UINT 2
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R8SINT 3
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R16UINT 4
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R16SINT 5
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R16FLOAT 6
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG8UNORM 7
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG8SNORM 8
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG8UINT 9
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG8SINT 10
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R32UINT 11
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R32SINT 12
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_R32FLOAT 13
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG16UINT 14
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG16SINT 15
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG16FLOAT 16
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA8UNORM 17
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA8UNORM_SRGB 18
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA8SNORM 19
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA8UINT 20
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA8SINT 21
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BGRA8UNORM 22
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BGRA8UNORM_SRGB 23
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGB9E5UFLOAT 24
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGB10A2UINT 25
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGB10A2UNORM 26
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG11B10UFLOAT 27
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG32UINT 28
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG32SINT 29
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RG32FLOAT 30
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA16UINT 31
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA16SINT 32
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA16FLOAT 33
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA32UINT 34
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA32SINT 35
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_RGBA32FLOAT 36
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_STENCIL8 37
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_DEPTH16UNORM 38
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_DEPTH24PLUS 39
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_DEPTH24PLUS_STENCIL8 40
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_DEPTH32FLOAT 41
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_DEPTH32FLOAT_STENCIL8 42
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC1_RGBA_UNORM 43
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC1_RGBA_UNORM_SRGB 44
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC2_RGBA_UNORM 45
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC2_RGBA_UNORM_SRGB 46
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC3_RGBA_UNORM 47
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC3_RGBA_UNORM_SRGB 48
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC4_R_UNORM 49
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC4_R_SNORM 50
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC5_RG_UNORM 51
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC5_RG_SNORM 52
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC6H_RGB_UFLOAT 53
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC6H_RGB_FLOAT 54
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC7_RGBA_UNORM 55
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_BC7_RGBA_UNORM_SRGB 56
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ETC2_RGB8UNORM 57
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ETC2_RGB8UNORM_SRGB 58
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ETC2_RGB8A1UNORM 59
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ETC2_RGB8A1UNORM_SRGB 60
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ETC2_RGBA8UNORM 61
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ETC2_RGBA8UNORM_SRGB 62
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_EAC_R11UNORM 63
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_EAC_R11SNORM 64
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_EAC_RG11UNORM 65
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_EAC_RG11SNORM 66
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC4X4_UNORM 67
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC4X4_UNORM_SRGB 68
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC5X4_UNORM 69
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC5X4_UNORM_SRGB 70
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC5X5_UNORM 71
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC5X5_UNORM_SRGB 72
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC6X5_UNORM 73
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC6X5_UNORM_SRGB 74
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC6X6_UNORM 75
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC6X6_UNORM_SRGB 76
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC8X5_UNORM 77
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC8X5_UNORM_SRGB 78
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC8X6_UNORM 79
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC8X6_UNORM_SRGB 80
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC8X8_UNORM 81
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC8X8_UNORM_SRGB 82
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC10X5_UNORM 83
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC10X5_UNORM_SRGB 84
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC10X6_UNORM 85
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC10X6_UNORM_SRGB 86
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC10X8_UNORM 87
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC10X8_UNORM_SRGB 88
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC10X10_UNORM 89
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC10X10_UNORM_SRGB 90
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC12X10_UNORM 91
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC12X10_UNORM_SRGB 92
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC12X12_UNORM 93
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_FORMAT_ASTC12X12_UNORM_SRGB 94
typedef struct wasi_webgpu_webgpu_own_gpu_sampler_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_sampler_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_sampler_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_sampler_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_address_mode_t;
#define WASI_WEBGPU_WEBGPU_GPU_ADDRESS_MODE_CLAMP_TO_EDGE 0
#define WASI_WEBGPU_WEBGPU_GPU_ADDRESS_MODE_REPEAT 1
#define WASI_WEBGPU_WEBGPU_GPU_ADDRESS_MODE_MIRROR_REPEAT 2
typedef uint8_t wasi_webgpu_webgpu_gpu_filter_mode_t;
#define WASI_WEBGPU_WEBGPU_GPU_FILTER_MODE_NEAREST 0
#define WASI_WEBGPU_WEBGPU_GPU_FILTER_MODE_LINEAR 1
typedef uint8_t wasi_webgpu_webgpu_gpu_mipmap_filter_mode_t;
#define WASI_WEBGPU_WEBGPU_GPU_MIPMAP_FILTER_MODE_NEAREST 0
#define WASI_WEBGPU_WEBGPU_GPU_MIPMAP_FILTER_MODE_LINEAR 1
typedef uint8_t wasi_webgpu_webgpu_gpu_compare_function_t;
#define WASI_WEBGPU_WEBGPU_GPU_COMPARE_FUNCTION_NEVER 0
#define WASI_WEBGPU_WEBGPU_GPU_COMPARE_FUNCTION_LESS 1
#define WASI_WEBGPU_WEBGPU_GPU_COMPARE_FUNCTION_EQUAL 2
#define WASI_WEBGPU_WEBGPU_GPU_COMPARE_FUNCTION_LESS_EQUAL 3
#define WASI_WEBGPU_WEBGPU_GPU_COMPARE_FUNCTION_GREATER 4
#define WASI_WEBGPU_WEBGPU_GPU_COMPARE_FUNCTION_NOT_EQUAL 5
#define WASI_WEBGPU_WEBGPU_GPU_COMPARE_FUNCTION_GREATER_EQUAL 6
#define WASI_WEBGPU_WEBGPU_GPU_COMPARE_FUNCTION_ALWAYS 7
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_address_mode_t val;
} wasi_webgpu_webgpu_option_gpu_address_mode_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_filter_mode_t val;
} wasi_webgpu_webgpu_option_gpu_filter_mode_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_mipmap_filter_mode_t val;
} wasi_webgpu_webgpu_option_gpu_mipmap_filter_mode_t;
typedef struct {
bool is_some;
float val;
} imports_option_f32_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_compare_function_t val;
} wasi_webgpu_webgpu_option_gpu_compare_function_t;
typedef struct {
bool is_some;
uint16_t val;
} imports_option_u16_t;
typedef struct wasi_webgpu_webgpu_gpu_sampler_descriptor_t {
wasi_webgpu_webgpu_option_gpu_address_mode_t address_mode_u;
wasi_webgpu_webgpu_option_gpu_address_mode_t address_mode_v;
wasi_webgpu_webgpu_option_gpu_address_mode_t address_mode_w;
wasi_webgpu_webgpu_option_gpu_filter_mode_t mag_filter;
wasi_webgpu_webgpu_option_gpu_filter_mode_t min_filter;
wasi_webgpu_webgpu_option_gpu_mipmap_filter_mode_t mipmap_filter;
imports_option_f32_t lod_min_clamp;
imports_option_f32_t lod_max_clamp;
wasi_webgpu_webgpu_option_gpu_compare_function_t compare;
imports_option_u16_t max_anisotropy;
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_sampler_descriptor_t;
typedef struct wasi_webgpu_webgpu_own_gpu_bind_group_layout_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_bind_group_layout_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_bind_group_layout_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_bind_group_layout_t;
typedef uint32_t wasi_webgpu_webgpu_gpu_shader_stage_flags_t;
typedef struct wasi_webgpu_webgpu_own_gpu_shader_stage_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_shader_stage_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_shader_stage_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_shader_stage_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_buffer_binding_type_t;
#define WASI_WEBGPU_WEBGPU_GPU_BUFFER_BINDING_TYPE_UNIFORM 0
#define WASI_WEBGPU_WEBGPU_GPU_BUFFER_BINDING_TYPE_STORAGE 1
#define WASI_WEBGPU_WEBGPU_GPU_BUFFER_BINDING_TYPE_READ_ONLY_STORAGE 2
typedef uint8_t wasi_webgpu_webgpu_gpu_sampler_binding_type_t;
#define WASI_WEBGPU_WEBGPU_GPU_SAMPLER_BINDING_TYPE_FILTERING 0
#define WASI_WEBGPU_WEBGPU_GPU_SAMPLER_BINDING_TYPE_NON_FILTERING 1
#define WASI_WEBGPU_WEBGPU_GPU_SAMPLER_BINDING_TYPE_COMPARISON 2
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_sampler_binding_type_t val;
} wasi_webgpu_webgpu_option_gpu_sampler_binding_type_t;
typedef struct wasi_webgpu_webgpu_gpu_sampler_binding_layout_t {
wasi_webgpu_webgpu_option_gpu_sampler_binding_type_t type;
} wasi_webgpu_webgpu_gpu_sampler_binding_layout_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_texture_sample_type_t;
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_SAMPLE_TYPE_FLOAT 0
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_SAMPLE_TYPE_UNFILTERABLE_FLOAT 1
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_SAMPLE_TYPE_DEPTH 2
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_SAMPLE_TYPE_SINT 3
#define WASI_WEBGPU_WEBGPU_GPU_TEXTURE_SAMPLE_TYPE_UINT 4
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_texture_sample_type_t val;
} wasi_webgpu_webgpu_option_gpu_texture_sample_type_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_texture_view_dimension_t val;
} wasi_webgpu_webgpu_option_gpu_texture_view_dimension_t;
typedef struct wasi_webgpu_webgpu_gpu_texture_binding_layout_t {
wasi_webgpu_webgpu_option_gpu_texture_sample_type_t sample_type;
wasi_webgpu_webgpu_option_gpu_texture_view_dimension_t view_dimension;
imports_option_bool_t multisampled;
} wasi_webgpu_webgpu_gpu_texture_binding_layout_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_storage_texture_access_t;
#define WASI_WEBGPU_WEBGPU_GPU_STORAGE_TEXTURE_ACCESS_WRITE_ONLY 0
#define WASI_WEBGPU_WEBGPU_GPU_STORAGE_TEXTURE_ACCESS_READ_ONLY 1
#define WASI_WEBGPU_WEBGPU_GPU_STORAGE_TEXTURE_ACCESS_READ_WRITE 2
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_storage_texture_access_t val;
} wasi_webgpu_webgpu_option_gpu_storage_texture_access_t;
typedef struct wasi_webgpu_webgpu_gpu_storage_texture_binding_layout_t {
wasi_webgpu_webgpu_option_gpu_storage_texture_access_t access;
wasi_webgpu_webgpu_gpu_texture_format_t format;
wasi_webgpu_webgpu_option_gpu_texture_view_dimension_t view_dimension;
} wasi_webgpu_webgpu_gpu_storage_texture_binding_layout_t;
typedef struct wasi_webgpu_webgpu_own_gpu_bind_group_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_bind_group_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_bind_group_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_bind_group_t;
typedef struct wasi_webgpu_webgpu_own_gpu_pipeline_layout_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_pipeline_layout_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_pipeline_layout_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_pipeline_layout_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_borrow_gpu_bind_group_layout_t val;
} wasi_webgpu_webgpu_option_borrow_gpu_bind_group_layout_t;
typedef struct {
wasi_webgpu_webgpu_option_borrow_gpu_bind_group_layout_t *ptr;
size_t len;
} wasi_webgpu_webgpu_list_option_borrow_gpu_bind_group_layout_t;
typedef struct wasi_webgpu_webgpu_gpu_pipeline_layout_descriptor_t {
wasi_webgpu_webgpu_list_option_borrow_gpu_bind_group_layout_t bind_group_layouts;
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_pipeline_layout_descriptor_t;
typedef struct wasi_webgpu_webgpu_own_gpu_shader_module_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_shader_module_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_shader_module_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_shader_module_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_compilation_message_type_t;
#define WASI_WEBGPU_WEBGPU_GPU_COMPILATION_MESSAGE_TYPE_ERROR 0
#define WASI_WEBGPU_WEBGPU_GPU_COMPILATION_MESSAGE_TYPE_WARNING 1
#define WASI_WEBGPU_WEBGPU_GPU_COMPILATION_MESSAGE_TYPE_INFO 2
typedef struct wasi_webgpu_webgpu_own_gpu_compilation_message_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_compilation_message_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_compilation_message_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_compilation_message_t;
typedef struct wasi_webgpu_webgpu_own_gpu_compilation_info_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_compilation_info_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_compilation_info_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_compilation_info_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_pipeline_error_reason_t;
#define WASI_WEBGPU_WEBGPU_GPU_PIPELINE_ERROR_REASON_VALIDATION 0
#define WASI_WEBGPU_WEBGPU_GPU_PIPELINE_ERROR_REASON_INTERNAL 1
typedef struct wasi_webgpu_webgpu_gpu_layout_mode_t {
uint8_t tag;
union {
wasi_webgpu_webgpu_borrow_gpu_pipeline_layout_t specific;
} val;
} wasi_webgpu_webgpu_gpu_layout_mode_t;
#define WASI_WEBGPU_WEBGPU_GPU_LAYOUT_MODE_SPECIFIC 0
#define WASI_WEBGPU_WEBGPU_GPU_LAYOUT_MODE_AUTO 1
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_layout_mode_t val;
} wasi_webgpu_webgpu_option_gpu_layout_mode_t;
typedef struct wasi_webgpu_webgpu_gpu_shader_module_compilation_hint_t {
imports_string_t entry_point;
wasi_webgpu_webgpu_option_gpu_layout_mode_t layout;
} wasi_webgpu_webgpu_gpu_shader_module_compilation_hint_t;
typedef struct {
wasi_webgpu_webgpu_gpu_shader_module_compilation_hint_t *ptr;
size_t len;
} wasi_webgpu_webgpu_list_gpu_shader_module_compilation_hint_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_list_gpu_shader_module_compilation_hint_t val;
} wasi_webgpu_webgpu_option_list_gpu_shader_module_compilation_hint_t;
typedef struct wasi_webgpu_webgpu_gpu_shader_module_descriptor_t {
imports_string_t code;
wasi_webgpu_webgpu_option_list_gpu_shader_module_compilation_hint_t compilation_hints;
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_shader_module_descriptor_t;
typedef struct wasi_webgpu_webgpu_own_record_gpu_pipeline_constant_value_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_record_gpu_pipeline_constant_value_t;
typedef struct wasi_webgpu_webgpu_borrow_record_gpu_pipeline_constant_value_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_record_gpu_pipeline_constant_value_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_own_record_gpu_pipeline_constant_value_t val;
} wasi_webgpu_webgpu_option_own_record_gpu_pipeline_constant_value_t;
typedef struct wasi_webgpu_webgpu_gpu_programmable_stage_t {
wasi_webgpu_webgpu_borrow_gpu_shader_module_t module;
imports_option_string_t entry_point;
wasi_webgpu_webgpu_option_own_record_gpu_pipeline_constant_value_t constants;
} wasi_webgpu_webgpu_gpu_programmable_stage_t;
typedef double wasi_webgpu_webgpu_gpu_pipeline_constant_value_t;
typedef struct wasi_webgpu_webgpu_own_gpu_compute_pipeline_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_compute_pipeline_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_compute_pipeline_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_compute_pipeline_t;
typedef struct wasi_webgpu_webgpu_gpu_compute_pipeline_descriptor_t {
wasi_webgpu_webgpu_gpu_programmable_stage_t compute;
wasi_webgpu_webgpu_gpu_layout_mode_t layout;
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_compute_pipeline_descriptor_t;
typedef struct wasi_webgpu_webgpu_own_gpu_render_pipeline_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_render_pipeline_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_render_pipeline_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_render_pipeline_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_primitive_topology_t;
#define WASI_WEBGPU_WEBGPU_GPU_PRIMITIVE_TOPOLOGY_POINT_LIST 0
#define WASI_WEBGPU_WEBGPU_GPU_PRIMITIVE_TOPOLOGY_LINE_LIST 1
#define WASI_WEBGPU_WEBGPU_GPU_PRIMITIVE_TOPOLOGY_LINE_STRIP 2
#define WASI_WEBGPU_WEBGPU_GPU_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST 3
#define WASI_WEBGPU_WEBGPU_GPU_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP 4
typedef uint8_t wasi_webgpu_webgpu_gpu_front_face_t;
#define WASI_WEBGPU_WEBGPU_GPU_FRONT_FACE_CCW 0
#define WASI_WEBGPU_WEBGPU_GPU_FRONT_FACE_CW 1
typedef uint8_t wasi_webgpu_webgpu_gpu_cull_mode_t;
#define WASI_WEBGPU_WEBGPU_GPU_CULL_MODE_NONE 0
#define WASI_WEBGPU_WEBGPU_GPU_CULL_MODE_FRONT 1
#define WASI_WEBGPU_WEBGPU_GPU_CULL_MODE_BACK 2
typedef uint32_t wasi_webgpu_webgpu_gpu_color_write_flags_t;
typedef struct wasi_webgpu_webgpu_own_gpu_color_write_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_color_write_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_color_write_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_color_write_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_blend_factor_t;
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ZERO 0
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ONE 1
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_SRC 2
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ONE_MINUS_SRC 3
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_SRC_ALPHA 4
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA 5
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_DST 6
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ONE_MINUS_DST 7
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_DST_ALPHA 8
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ONE_MINUS_DST_ALPHA 9
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_SRC_ALPHA_SATURATED 10
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_CONSTANT 11
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ONE_MINUS_CONSTANT 12
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_SRC1 13
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ONE_MINUS_SRC1 14
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_SRC1_ALPHA 15
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA 16
typedef uint8_t wasi_webgpu_webgpu_gpu_blend_operation_t;
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_OPERATION_ADD 0
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_OPERATION_SUBTRACT 1
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_OPERATION_REVERSE_SUBTRACT 2
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_OPERATION_MIN 3
#define WASI_WEBGPU_WEBGPU_GPU_BLEND_OPERATION_MAX 4
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_blend_operation_t val;
} wasi_webgpu_webgpu_option_gpu_blend_operation_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_blend_factor_t val;
} wasi_webgpu_webgpu_option_gpu_blend_factor_t;
typedef struct wasi_webgpu_webgpu_gpu_blend_component_t {
wasi_webgpu_webgpu_option_gpu_blend_operation_t operation;
wasi_webgpu_webgpu_option_gpu_blend_factor_t src_factor;
wasi_webgpu_webgpu_option_gpu_blend_factor_t dst_factor;
} wasi_webgpu_webgpu_gpu_blend_component_t;
typedef struct wasi_webgpu_webgpu_gpu_blend_state_t {
wasi_webgpu_webgpu_gpu_blend_component_t color;
wasi_webgpu_webgpu_gpu_blend_component_t alpha;
} wasi_webgpu_webgpu_gpu_blend_state_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_blend_state_t val;
} wasi_webgpu_webgpu_option_gpu_blend_state_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_color_write_flags_t val;
} imports_option_gpu_color_write_flags_t;
typedef struct wasi_webgpu_webgpu_gpu_color_target_state_t {
wasi_webgpu_webgpu_gpu_texture_format_t format;
wasi_webgpu_webgpu_option_gpu_blend_state_t blend;
imports_option_gpu_color_write_flags_t write_mask;
} wasi_webgpu_webgpu_gpu_color_target_state_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_color_target_state_t val;
} wasi_webgpu_webgpu_option_gpu_color_target_state_t;
typedef struct {
wasi_webgpu_webgpu_option_gpu_color_target_state_t *ptr;
size_t len;
} wasi_webgpu_webgpu_list_option_gpu_color_target_state_t;
typedef struct wasi_webgpu_webgpu_gpu_fragment_state_t {
wasi_webgpu_webgpu_list_option_gpu_color_target_state_t targets;
wasi_webgpu_webgpu_borrow_gpu_shader_module_t module;
imports_option_string_t entry_point;
wasi_webgpu_webgpu_option_own_record_gpu_pipeline_constant_value_t constants;
} wasi_webgpu_webgpu_gpu_fragment_state_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_stencil_operation_t;
#define WASI_WEBGPU_WEBGPU_GPU_STENCIL_OPERATION_KEEP 0
#define WASI_WEBGPU_WEBGPU_GPU_STENCIL_OPERATION_ZERO 1
#define WASI_WEBGPU_WEBGPU_GPU_STENCIL_OPERATION_REPLACE 2
#define WASI_WEBGPU_WEBGPU_GPU_STENCIL_OPERATION_INVERT 3
#define WASI_WEBGPU_WEBGPU_GPU_STENCIL_OPERATION_INCREMENT_CLAMP 4
#define WASI_WEBGPU_WEBGPU_GPU_STENCIL_OPERATION_DECREMENT_CLAMP 5
#define WASI_WEBGPU_WEBGPU_GPU_STENCIL_OPERATION_INCREMENT_WRAP 6
#define WASI_WEBGPU_WEBGPU_GPU_STENCIL_OPERATION_DECREMENT_WRAP 7
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_stencil_operation_t val;
} wasi_webgpu_webgpu_option_gpu_stencil_operation_t;
typedef struct wasi_webgpu_webgpu_gpu_stencil_face_state_t {
wasi_webgpu_webgpu_option_gpu_compare_function_t compare;
wasi_webgpu_webgpu_option_gpu_stencil_operation_t fail_op;
wasi_webgpu_webgpu_option_gpu_stencil_operation_t depth_fail_op;
wasi_webgpu_webgpu_option_gpu_stencil_operation_t pass_op;
} wasi_webgpu_webgpu_gpu_stencil_face_state_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_index_format_t;
#define WASI_WEBGPU_WEBGPU_GPU_INDEX_FORMAT_UINT16 0
#define WASI_WEBGPU_WEBGPU_GPU_INDEX_FORMAT_UINT32 1
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_primitive_topology_t val;
} wasi_webgpu_webgpu_option_gpu_primitive_topology_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_index_format_t val;
} wasi_webgpu_webgpu_option_gpu_index_format_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_front_face_t val;
} wasi_webgpu_webgpu_option_gpu_front_face_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_cull_mode_t val;
} wasi_webgpu_webgpu_option_gpu_cull_mode_t;
typedef struct wasi_webgpu_webgpu_gpu_primitive_state_t {
wasi_webgpu_webgpu_option_gpu_primitive_topology_t topology;
wasi_webgpu_webgpu_option_gpu_index_format_t strip_index_format;
wasi_webgpu_webgpu_option_gpu_front_face_t front_face;
wasi_webgpu_webgpu_option_gpu_cull_mode_t cull_mode;
imports_option_bool_t unclipped_depth;
} wasi_webgpu_webgpu_gpu_primitive_state_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_vertex_format_t;
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT8 0
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT8X2 1
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT8X4 2
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT8 3
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT8X2 4
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT8X4 5
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UNORM8 6
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UNORM8X2 7
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UNORM8X4 8
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SNORM8 9
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SNORM8X2 10
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SNORM8X4 11
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT16 12
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT16X2 13
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT16X4 14
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT16 15
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT16X2 16
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT16X4 17
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UNORM16 18
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UNORM16X2 19
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UNORM16X4 20
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SNORM16 21
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SNORM16X2 22
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SNORM16X4 23
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_FLOAT16 24
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_FLOAT16X2 25
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_FLOAT16X4 26
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_FLOAT32 27
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_FLOAT32X2 28
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_FLOAT32X3 29
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_FLOAT32X4 30
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT32 31
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT32X2 32
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT32X3 33
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UINT32X4 34
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT32 35
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT32X2 36
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT32X3 37
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_SINT32X4 38
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UNORM1010102 39
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_FORMAT_UNORM8X4_BGRA 40
typedef uint8_t wasi_webgpu_webgpu_gpu_vertex_step_mode_t;
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_STEP_MODE_VERTEX 0
#define WASI_WEBGPU_WEBGPU_GPU_VERTEX_STEP_MODE_INSTANCE 1
typedef struct wasi_webgpu_webgpu_own_gpu_command_buffer_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_command_buffer_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_command_buffer_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_command_buffer_t;
typedef struct wasi_webgpu_webgpu_gpu_command_buffer_descriptor_t {
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_command_buffer_descriptor_t;
typedef struct wasi_webgpu_webgpu_own_gpu_command_encoder_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_command_encoder_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_command_encoder_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_command_encoder_t;
typedef struct wasi_webgpu_webgpu_gpu_command_encoder_descriptor_t {
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_command_encoder_descriptor_t;
typedef struct wasi_webgpu_webgpu_own_gpu_compute_pass_encoder_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_compute_pass_encoder_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_compute_pass_encoder_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_compute_pass_encoder_t;
typedef struct wasi_webgpu_webgpu_own_gpu_render_pass_encoder_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_render_pass_encoder_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_render_pass_encoder_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_render_pass_encoder_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_load_op_t;
#define WASI_WEBGPU_WEBGPU_GPU_LOAD_OP_LOAD 0
#define WASI_WEBGPU_WEBGPU_GPU_LOAD_OP_CLEAR 1
typedef uint8_t wasi_webgpu_webgpu_gpu_store_op_t;
#define WASI_WEBGPU_WEBGPU_GPU_STORE_OP_STORE 0
#define WASI_WEBGPU_WEBGPU_GPU_STORE_OP_DISCARD 1
typedef struct wasi_webgpu_webgpu_own_gpu_render_bundle_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_render_bundle_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_render_bundle_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_render_bundle_t;
typedef struct wasi_webgpu_webgpu_gpu_render_bundle_descriptor_t {
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_render_bundle_descriptor_t;
typedef struct wasi_webgpu_webgpu_own_gpu_render_bundle_encoder_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_render_bundle_encoder_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_render_bundle_encoder_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_render_bundle_encoder_t;
typedef struct wasi_webgpu_webgpu_gpu_queue_descriptor_t {
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_queue_descriptor_t;
typedef struct {
wasi_webgpu_webgpu_gpu_feature_name_t *ptr;
size_t len;
} wasi_webgpu_webgpu_list_gpu_feature_name_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_list_gpu_feature_name_t val;
} wasi_webgpu_webgpu_option_list_gpu_feature_name_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_own_record_option_gpu_size64_t val;
} wasi_webgpu_webgpu_option_own_record_option_gpu_size64_t;
typedef struct {
bool is_some;
wasi_webgpu_webgpu_gpu_queue_descriptor_t val;
} wasi_webgpu_webgpu_option_gpu_queue_descriptor_t;
typedef struct wasi_webgpu_webgpu_gpu_device_descriptor_t {
wasi_webgpu_webgpu_option_list_gpu_feature_name_t required_features;
wasi_webgpu_webgpu_option_own_record_option_gpu_size64_t required_limits;
wasi_webgpu_webgpu_option_gpu_queue_descriptor_t default_queue;
imports_option_string_t label;
} wasi_webgpu_webgpu_gpu_device_descriptor_t;
typedef struct wasi_webgpu_webgpu_own_gpu_queue_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_queue_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_queue_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_queue_t;
typedef struct wasi_webgpu_webgpu_own_gpu_query_set_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_query_set_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_query_set_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_query_set_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_query_type_t;
#define WASI_WEBGPU_WEBGPU_GPU_QUERY_TYPE_OCCLUSION 0
#define WASI_WEBGPU_WEBGPU_GPU_QUERY_TYPE_TIMESTAMP 1
typedef struct wasi_webgpu_webgpu_own_gpu_canvas_context_t {
int32_t __handle;
} wasi_webgpu_webgpu_own_gpu_canvas_context_t;
typedef struct wasi_webgpu_webgpu_borrow_gpu_canvas_context_t {
int32_t __handle;
} wasi_webgpu_webgpu_borrow_gpu_canvas_context_t;
typedef uint8_t wasi_webgpu_webgpu_gpu_canvas_alpha_mode_t;
#define WASI_WEBGPU_WEBGPU_GPU_CANVAS_ALPHA_MODE_OPAQUE 0
#define WASI_WEBGPU_WEBGPU_GPU_CANVAS_ALPHA_MODE_PREMULTIPLIED 1
typedef uint8_t wasi_webgpu_webgpu_gpu_canvas_tone_mapping_mode_t;
#define WASI_WEBGPU_WEBGPU_GPU_CANVAS_TONE_MAPPING_MODE_STANDARD 0
#define WASI_WEBGPU_WEBGPU_GPU_CANVAS_TONE_MAPPING_MODE_EXTENDED 1