forked from hexops-graveyard/dawn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dawn.json
2919 lines (2880 loc) · 113 KB
/
dawn.json
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
{
"_comment": [
"Copyright 2017 The Dawn Authors",
"",
"Licensed under the Apache License, Version 2.0 (the \"License\");",
"you may not use this file except in compliance with the License.",
"You may obtain a copy of the License at",
"",
" http://www.apache.org/licenses/LICENSE-2.0",
"",
"Unless required by applicable law or agreed to in writing, software",
"distributed under the License is distributed on an \"AS IS\" BASIS,",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
"See the License for the specific language governing permissions and",
"limitations under the License."
],
"_doc": "See docs/dawn/codegen.md",
"_metadata": {
"api": "WebGPU",
"c_prefix": "WGPU",
"namespace": "wgpu",
"proc_table_prefix": "Dawn",
"native_namespace": "dawn native",
"copyright_year": "2019"
},
"create instance": {
"category": "function",
"returns": "instance",
"args": [
{"name": "descriptor", "type": "instance descriptor", "annotation": "const*", "optional": true}
]
},
"proc": {
"category": "function pointer",
"returns": "void",
"args": []
},
"get proc address": {
"category": "function",
"returns": "proc",
"args": [
{"name": "device", "type": "device"},
{"name": "proc name", "type": "char", "annotation": "const*"}
]
},
"request adapter options": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "compatible surface", "type": "surface", "optional": true},
{"name": "power preference", "type": "power preference", "default": "undefined"},
{"name": "force fallback adapter", "type": "bool", "default": "false"}
]
},
"request adapter status": {
"category": "enum",
"emscripten_no_enum_table": true,
"values": [
{"value": 0, "name": "success"},
{"value": 1, "name": "unavailable"},
{"value": 2, "name": "error"},
{"value": 3, "name": "unknown"}
]
},
"request adapter callback": {
"category": "function pointer",
"args": [
{"name": "status", "type": "request adapter status"},
{"name": "adapter", "type": "adapter"},
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"adapter": {
"category": "object",
"methods": [
{
"name": "get limits",
"returns": "bool",
"args": [
{"name": "limits", "type": "supported limits", "annotation": "*"}
]
},
{
"name": "get properties",
"args": [
{"name": "properties", "type": "adapter properties", "annotation": "*"}
]
},
{
"name": "has feature",
"returns": "bool",
"args": [
{"name": "feature", "type": "feature name"}
]
},
{
"name": "enumerate features",
"returns": "size_t",
"args": [
{"name": "features", "type": "feature name", "annotation": "*"}
]
},
{
"name": "request device",
"args": [
{"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true, "no_default": true},
{"name": "callback", "type": "request device callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
{
"name": "create device",
"tags": ["dawn"],
"returns": "device",
"args": [
{"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true}
]
}
]
},
"adapter properties": {
"category": "structure",
"extensible": "out",
"members": [
{"name": "vendor ID", "type": "uint32_t"},
{"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "device ID", "type": "uint32_t"},
{"name": "name", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "adapter type", "type": "adapter type"},
{"name": "backend type", "type": "backend type"}
]
},
"adapter type": {
"category": "enum",
"emscripten_no_enum_table": true,
"values": [
{"value": 0, "name": "discrete GPU"},
{"value": 1, "name": "integrated GPU"},
{"value": 2, "name": "CPU"},
{"value": 3, "name": "unknown"}
]
},
"device descriptor": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "required features count", "type": "uint32_t", "default": 0},
{"name": "required features", "type": "feature name", "annotation": "const*", "length": "required features count", "default": "nullptr"},
{"name": "required limits", "type": "required limits", "annotation": "const*", "optional": true},
{"name": "default queue", "type": "queue descriptor"}
]
},
"dawn toggles device descriptor": {
"tags": ["dawn", "native"],
"category": "structure",
"chained": "in",
"chain roots": ["device descriptor"],
"members": [
{"name": "force enabled toggles count", "type": "uint32_t", "default": 0},
{"name": "force enabled toggles", "type": "char", "annotation": "const*const*", "length": "force enabled toggles count"},
{"name": "force disabled toggles count", "type": "uint32_t", "default": 0},
{"name": "force disabled toggles", "type": "char", "annotation": "const*const*", "length": "force disabled toggles count"}
]
},
"dawn cache device descriptor" : {
"tags": ["dawn", "native"],
"category": "structure",
"chained": "in",
"chain roots": ["device descriptor"],
"members": [
{"name": "isolation key", "type": "char", "annotation": "const*", "length": "strlen", "default": "\"\""}
]
},
"address mode": {
"category": "enum",
"values": [
{"value": 0, "name": "repeat"},
{"value": 1, "name": "mirror repeat"},
{"value": 2, "name": "clamp to edge"}
]
},
"backend type": {
"category": "enum",
"emscripten_no_enum_table": true,
"values": [
{"value": 0, "name": "null"},
{"value": 1, "name": "WebGPU"},
{"value": 2, "name": "D3D11"},
{"value": 3, "name": "D3D12"},
{"value": 4, "name": "metal"},
{"value": 5, "name": "vulkan"},
{"value": 6, "name": "openGL"},
{"value": 7, "name": "openGLES"}
]
},
"bind group": {
"category": "object",
"methods": [
{
"name": "set label",
"returns": "void",
"args": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
]
}
]
},
"bind group entry": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "binding", "type": "uint32_t"},
{"name": "buffer", "type": "buffer", "optional": true},
{"name": "offset", "type": "uint64_t", "default": "0"},
{"name": "size", "type": "uint64_t"},
{"name": "sampler", "type": "sampler", "optional": true},
{"name": "texture view", "type": "texture view", "optional": true}
]
},
"bind group descriptor": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "layout", "type": "bind group layout"},
{"name": "entry count", "type": "uint32_t"},
{"name": "entries", "type": "bind group entry", "annotation": "const*", "length": "entry count"}
]
},
"bind group layout": {
"category": "object",
"methods": [
{
"name": "set label",
"returns": "void",
"args": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
]
}
]
},
"buffer binding type": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "uniform"},
{"value": 2, "name": "storage"},
{"value": 3, "name": "read only storage"}
]
},
"buffer binding layout": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "type", "type": "buffer binding type", "default": "undefined"},
{"name": "has dynamic offset", "type": "bool", "default": "false"},
{"name": "min binding size", "type": "uint64_t", "default": "0"}
]
},
"sampler binding type": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "filtering"},
{"value": 2, "name": "non filtering"},
{"value": 3, "name": "comparison"}
]
},
"sampler binding layout": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "type", "type": "sampler binding type", "default": "undefined"}
]
},
"texture sample type": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "float"},
{"value": 2, "name": "unfilterable float"},
{"value": 3, "name": "depth"},
{"value": 4, "name": "sint"},
{"value": 5, "name": "uint"}
]
},
"texture binding layout": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "sample type", "type": "texture sample type", "default": "undefined"},
{"name": "view dimension", "type": "texture view dimension", "default": "undefined"},
{"name": "multisampled", "type": "bool", "default": "false"}
]
},
"external texture binding entry": {
"category": "structure",
"chained": "in",
"chain roots": ["bind group entry"],
"tags": ["dawn"],
"members": [
{"name": "external texture", "type": "external texture"}
]
},
"external texture binding layout": {
"category": "structure",
"chained": "in",
"chain roots": ["bind group layout entry"],
"tags": ["dawn"],
"members": []
},
"storage texture access": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "write only"}
]
},
"storage texture binding layout": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "access", "type": "storage texture access", "default": "undefined"},
{"name": "format", "type": "texture format", "default": "undefined"},
{"name": "view dimension", "type": "texture view dimension", "default": "undefined"}
]
},
"bind group layout entry": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "binding", "type": "uint32_t"},
{"name": "visibility", "type": "shader stage"},
{"name": "buffer", "type": "buffer binding layout"},
{"name": "sampler", "type": "sampler binding layout"},
{"name": "texture", "type": "texture binding layout"},
{"name": "storage texture", "type": "storage texture binding layout"}
]
},
"bind group layout descriptor": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "entry count", "type": "uint32_t"},
{"name": "entries", "type": "bind group layout entry", "annotation": "const*", "length": "entry count"}
]
},
"blend component": {
"category": "structure",
"extensible": false,
"members": [
{"name": "operation", "type": "blend operation", "default": "add"},
{"name": "src factor", "type": "blend factor", "default": "one"},
{"name": "dst factor", "type": "blend factor", "default": "zero"}
]
},
"blend factor": {
"category": "enum",
"values": [
{"value": 0, "name": "zero"},
{"value": 1, "name": "one"},
{"value": 2, "name": "src"},
{"value": 3, "name": "one minus src"},
{"value": 4, "name": "src alpha"},
{"value": 5, "name": "one minus src alpha"},
{"value": 6, "name": "dst"},
{"value": 7, "name": "one minus dst"},
{"value": 8, "name": "dst alpha"},
{"value": 9, "name": "one minus dst alpha"},
{"value": 10, "name": "src alpha saturated"},
{"value": 11, "name": "constant"},
{"value": 12, "name": "one minus constant"}
]
},
"blend operation": {
"category": "enum",
"values": [
{"value": 0, "name": "add"},
{"value": 1, "name": "subtract"},
{"value": 2, "name": "reverse subtract"},
{"value": 3, "name": "min"},
{"value": 4, "name": "max"}
]
},
"bool": {
"category": "native"
},
"buffer": {
"category": "object",
"methods": [
{
"name": "map async",
"args": [
{"name": "mode", "type": "map mode"},
{"name": "offset", "type": "size_t"},
{"name": "size", "type": "size_t"},
{"name": "callback", "type": "buffer map callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
{
"name": "get mapped range",
"returns": "void *",
"args": [
{"name": "offset", "type": "size_t", "default": 0},
{"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"}
]
},
{
"name": "get const mapped range",
"returns": "void const *",
"args": [
{"name": "offset", "type": "size_t", "default": 0},
{"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"}
]
},
{
"name": "set label",
"returns": "void",
"args": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
{
"name": "get usage",
"returns": "buffer usage"
},
{
"name": "get size",
"returns": "uint64_t"
},
{
"name": "unmap"
},
{
"name": "destroy"
}
]
},
"buffer descriptor": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "usage", "type": "buffer usage"},
{"name": "size", "type": "uint64_t"},
{"name": "mapped at creation", "type": "bool", "default": "false"}
]
},
"buffer map callback": {
"category": "function pointer",
"args": [
{"name": "status", "type": "buffer map async status"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"buffer map async status": {
"category": "enum",
"emscripten_no_enum_table": true,
"values": [
{"value": 0, "name": "success"},
{"value": 1, "name": "error"},
{"value": 2, "name": "unknown"},
{"value": 3, "name": "device lost"},
{"value": 4, "name": "destroyed before callback"},
{"value": 5, "name": "unmapped before callback"}
]
},
"buffer usage": {
"category": "bitmask",
"values": [
{"value": 0, "name": "none"},
{"value": 1, "name": "map read"},
{"value": 2, "name": "map write"},
{"value": 4, "name": "copy src"},
{"value": 8, "name": "copy dst"},
{"value": 16, "name": "index"},
{"value": 32, "name": "vertex"},
{"value": 64, "name": "uniform"},
{"value": 128, "name": "storage"},
{"value": 256, "name": "indirect"},
{"value": 512, "name": "query resolve"}
]
},
"char": {
"category": "native"
},
"color": {
"category": "structure",
"members": [
{"name": "r", "type": "double"},
{"name": "g", "type": "double"},
{"name": "b", "type": "double"},
{"name": "a", "type": "double"}
]
},
"color write mask": {
"category": "bitmask",
"values": [
{"value": 0, "name": "none"},
{"value": 1, "name": "red"},
{"value": 2, "name": "green"},
{"value": 4, "name": "blue"},
{"value": 8, "name": "alpha"},
{"value": 15, "name": "all"}
]
},
"constant entry": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "key", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "value", "type": "double"}
]
},
"command buffer": {
"category": "object",
"methods": [
{
"name": "set label",
"returns": "void",
"args": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
]
}
]
},
"command buffer descriptor": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
]
},
"command encoder": {
"category": "object",
"methods": [
{
"name": "finish",
"returns": "command buffer",
"args": [
{"name": "descriptor", "type": "command buffer descriptor", "annotation": "const*", "optional": true}
]
},
{
"name": "begin compute pass",
"returns": "compute pass encoder",
"args": [
{"name": "descriptor", "type": "compute pass descriptor", "annotation": "const*", "optional": true}
]
},
{
"name": "begin render pass",
"returns": "render pass encoder",
"args": [
{"name": "descriptor", "type": "render pass descriptor", "annotation": "const*"}
]
},
{
"name": "copy buffer to buffer",
"args": [
{"name": "source", "type": "buffer"},
{"name": "source offset", "type": "uint64_t"},
{"name": "destination", "type": "buffer"},
{"name": "destination offset", "type": "uint64_t"},
{"name": "size", "type": "uint64_t"}
]
},
{
"name": "copy buffer to texture",
"args": [
{"name": "source", "type": "image copy buffer", "annotation": "const*"},
{"name": "destination", "type": "image copy texture", "annotation": "const*"},
{"name": "copy size", "type": "extent 3D", "annotation": "const*"}
]
},
{
"name": "copy texture to buffer",
"args": [
{"name": "source", "type": "image copy texture", "annotation": "const*"},
{"name": "destination", "type": "image copy buffer", "annotation": "const*"},
{"name": "copy size", "type": "extent 3D", "annotation": "const*"}
]
},
{
"name": "copy texture to texture",
"args": [
{"name": "source", "type": "image copy texture", "annotation": "const*"},
{"name": "destination", "type": "image copy texture", "annotation": "const*"},
{"name": "copy size", "type": "extent 3D", "annotation": "const*"}
]
},
{
"name": "copy texture to texture internal",
"tags": ["dawn"],
"args": [
{"name": "source", "type": "image copy texture", "annotation": "const*"},
{"name": "destination", "type": "image copy texture", "annotation": "const*"},
{"name": "copy size", "type": "extent 3D", "annotation": "const*"}
]
},
{
"name": "clear buffer",
"args": [
{"name": "buffer", "type": "buffer"},
{"name": "offset", "type": "uint64_t", "default": 0},
{"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
]
},
{
"name": "inject validation error",
"tags": ["dawn"],
"args": [
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
{
"name": "insert debug marker",
"args": [
{"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
{
"name": "pop debug group",
"args": []
},
{
"name": "push debug group",
"args": [
{"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
{
"name": "resolve query set",
"args": [
{"name": "query set", "type": "query set"},
{"name": "first query", "type": "uint32_t"},
{"name": "query count", "type": "uint32_t"},
{"name": "destination", "type": "buffer"},
{"name": "destination offset", "type": "uint64_t"}
]
},
{
"name": "write buffer",
"tags": ["dawn"],
"args": [
{"name": "buffer", "type": "buffer"},
{"name": "buffer offset", "type": "uint64_t"},
{"name": "data", "type": "uint8_t", "annotation": "const*", "length": "size"},
{"name": "size", "type": "uint64_t"}
]
},
{
"name": "write timestamp",
"args": [
{"name": "query set", "type": "query set"},
{"name": "query index", "type": "uint32_t"}
]
},
{
"name": "set label",
"returns": "void",
"args": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
]
}
]
},
"command encoder descriptor": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
]
},
"compare function": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "never"},
{"value": 2, "name": "less"},
{"value": 3, "name": "less equal"},
{"value": 4, "name": "greater"},
{"value": 5, "name": "greater equal"},
{"value": 6, "name": "equal"},
{"value": 7, "name": "not equal"},
{"value": 8, "name": "always"}
]
},
"compilation info": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "message count", "type": "uint32_t"},
{"name": "messages", "type": "compilation message", "annotation": "const*", "length": "message count"}
]
},
"compilation info callback": {
"category": "function pointer",
"args": [
{"name": "status", "type": "compilation info request status"},
{"name": "compilation info", "type": "compilation info", "annotation": "const*"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"compilation info request status": {
"category": "enum",
"values": [
{"value": 0, "name": "success"},
{"value": 1, "name": "error"},
{"value": 2, "name": "device lost"},
{"value": 3, "name": "unknown"}
]
},
"compilation message": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "type", "type": "compilation message type"},
{"name": "line num", "type": "uint64_t"},
{"name": "line pos", "type": "uint64_t"},
{"name": "offset", "type": "uint64_t"},
{"name": "length", "type": "uint64_t"}
]
},
"compilation message type": {
"category": "enum",
"emscripten_no_enum_table": true,
"values": [
{"value": 0, "name": "error"},
{"value": 1, "name": "warning"},
{"value": 2, "name": "info"}
]
},
"compute pass descriptor": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "timestamp write count", "type": "uint32_t", "default": 0},
{"name": "timestamp writes", "type": "compute pass timestamp write", "annotation": "const*", "length": "timestamp write count"}
]
},
"compute pass encoder": {
"category": "object",
"methods": [
{
"name": "insert debug marker",
"args": [
{"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
{
"name": "pop debug group",
"args": []
},
{
"name": "push debug group",
"args": [
{"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
{
"name": "set pipeline",
"args": [
{"name": "pipeline", "type": "compute pipeline"}
]
},
{
"name": "set bind group",
"args": [
{"name": "group index", "type": "uint32_t"},
{"name": "group", "type": "bind group"},
{"name": "dynamic offset count", "type": "uint32_t", "default": "0"},
{"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"}
]
},
{
"name": "write timestamp",
"tags": ["emscripten", "dawn"],
"args": [
{"name": "query set", "type": "query set"},
{"name": "query index", "type": "uint32_t"}
]
},
{
"name": "begin pipeline statistics query",
"tags": ["upstream", "emscripten"],
"args": [
{"name": "query set", "type": "query set"},
{"name": "query index", "type": "uint32_t"}
]
},
{
"name": "dispatch",
"tags": ["deprecated"],
"args": [
{"name": "workgroupCountX", "type": "uint32_t"},
{"name": "workgroupCountY", "type": "uint32_t", "default": "1"},
{"name": "workgroupCountZ", "type": "uint32_t", "default": "1"}
]
},
{
"name": "dispatch workgroups",
"args": [
{"name": "workgroupCountX", "type": "uint32_t"},
{"name": "workgroupCountY", "type": "uint32_t", "default": "1"},
{"name": "workgroupCountZ", "type": "uint32_t", "default": "1"}
]
},
{
"name": "dispatch indirect",
"tags": ["deprecated"],
"args": [
{"name": "indirect buffer", "type": "buffer"},
{"name": "indirect offset", "type": "uint64_t"}
]
},
{
"name": "dispatch workgroups indirect",
"args": [
{"name": "indirect buffer", "type": "buffer"},
{"name": "indirect offset", "type": "uint64_t"}
]
},
{
"name": "end"
},
{
"name": "end pass",
"tags": ["deprecated"]
},
{
"name": "end pipeline statistics query",
"tags": ["upstream", "emscripten"]
},
{
"name": "set label",
"returns": "void",
"args": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
]
}
]
},
"compute pass timestamp location": {
"category": "enum",
"values": [
{"value": 0, "name": "beginning"},
{"value": 1, "name": "end"}
]
},
"compute pass timestamp write": {
"category": "structure",
"members": [
{"name": "query set", "type": "query set"},
{"name": "query index", "type": "uint32_t"},
{"name": "location", "type": "compute pass timestamp location"}
]
},
"compute pipeline": {
"category": "object",
"methods": [
{
"name": "get bind group layout",
"returns": "bind group layout",
"args": [
{"name": "group index", "type": "uint32_t"}
]
},
{
"name": "set label",
"returns": "void",
"args": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
]
}
]
},
"compute pipeline descriptor": {
"category": "structure",
"extensible": "in",
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "layout", "type": "pipeline layout", "optional": true},
{"name": "compute", "type": "programmable stage descriptor"}
]
},
"alpha mode": {
"category": "enum",
"tags": ["dawn"],
"values": [
{"value": 0, "name": "premultiplied"},
{"value": 1, "name": "unpremultiplied"},
{"value": 2, "name": "opaque"}
]
},
"copy texture for browser options": {
"category": "structure",
"extensible": "in",
"tags": ["dawn"],
"_TODO": "support number as length input",
"members": [
{"name": "flip y", "type": "bool", "default": "false"},
{"name": "needs color space conversion", "type": "bool", "default": "false"},
{"name": "src alpha mode", "type": "alpha mode", "default": "unpremultiplied"},
{"name": "src transfer function parameters", "type": "float", "annotation": "const*",
"length": 7, "optional": true},
{"name": "conversion matrix", "type": "float", "annotation": "const*",
"length": 9, "optional": true},
{"name": "dst transfer function parameters", "type": "float", "annotation": "const*",
"length": 7, "optional": true},
{"name": "dst alpha mode", "type": "alpha mode", "default": "unpremultiplied"},
{"name": "internal usage", "type": "bool", "default": "false"}
]
},
"create compute pipeline async callback": {
"category": "function pointer",
"args": [
{"name": "status", "type": "create pipeline async status"},
{"name": "pipeline", "type": "compute pipeline"},
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"create pipeline async status": {
"category": "enum",
"emscripten_no_enum_table": true,
"values": [
{"value": 0, "name": "success"},
{"value": 1, "name": "error"},
{"value": 2, "name": "device lost"},
{"value": 3, "name": "device destroyed"},
{"value": 4, "name": "unknown"}
]
},
"create render pipeline async callback": {
"category": "function pointer",
"args": [
{"name": "status", "type": "create pipeline async status"},
{"name": "pipeline", "type": "render pipeline"},
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"cull mode": {
"category": "enum",
"values": [
{"value": 0, "name": "none"},
{"value": 1, "name": "front"},
{"value": 2, "name": "back"}
]
},
"device": {
"category": "object",
"methods": [
{
"name": "create bind group",
"returns": "bind group",
"args": [
{"name": "descriptor", "type": "bind group descriptor", "annotation": "const*"}
]
},
{
"name": "create bind group layout",
"returns": "bind group layout",
"args": [
{"name": "descriptor", "type": "bind group layout descriptor", "annotation": "const*"}
]
},
{
"name": "create buffer",
"returns": "buffer",
"args": [
{"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"}
]
},
{
"name": "create error buffer",
"returns": "buffer",
"tags": ["dawn"]
},
{