Skip to content

Commit 1593fb5

Browse files
committed
WebGPU: roll header and generated changes in from Dawn
Rolls to dawn revision: https://dawn.googlesource.com/dawn/+log/ad853f80af9b236fa3aa6be6dcd2facb26430565 and fixes library_webgpu.js where necessary. Also adds several files to match Dawn, so that Emscripten mirrors Dawn's generated files directly, requiring less manual intervention.
1 parent 1059b20 commit 1593fb5

File tree

10 files changed

+1264
-619
lines changed

10 files changed

+1264
-619
lines changed

src/generated_struct_info32.json

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,13 @@
842842
"size": 16,
843843
"usage": 8
844844
},
845+
"WGPUBufferMapCallbackInfo": {
846+
"__size__": 16,
847+
"callback": 8,
848+
"mode": 4,
849+
"nextInChain": 0,
850+
"userdata": 12
851+
},
845852
"WGPUChainedStruct": {
846853
"__size__": 8,
847854
"next": 0,
@@ -936,8 +943,8 @@
936943
"deviceLostUserdata": 32,
937944
"label": 4,
938945
"nextInChain": 0,
946+
"requiredFeatureCount": 8,
939947
"requiredFeatures": 12,
940-
"requiredFeaturesCount": 8,
941948
"requiredLimits": 16
942949
},
943950
"WGPUExtent3D": {
@@ -956,6 +963,15 @@
956963
"targetCount": 20,
957964
"targets": 24
958965
},
966+
"WGPUFuture": {
967+
"__size__": 8,
968+
"id": 0
969+
},
970+
"WGPUFutureWaitInfo": {
971+
"__size__": 16,
972+
"completed": 8,
973+
"future": 0
974+
},
959975
"WGPUImageCopyBuffer": {
960976
"__size__": 40,
961977
"buffer": 32,
@@ -971,9 +987,16 @@
971987
"texture": 4
972988
},
973989
"WGPUInstanceDescriptor": {
974-
"__size__": 4,
990+
"__size__": 16,
991+
"features": 4,
975992
"nextInChain": 0
976993
},
994+
"WGPUInstanceFeatures": {
995+
"__size__": 12,
996+
"nextInChain": 0,
997+
"timedWaitAnyEnable": 4,
998+
"timedWaitAnyMaxCount": 8
999+
},
9771000
"WGPULimits": {
9781001
"__size__": 144,
9791002
"maxBindGroups": 16,
@@ -1062,21 +1085,28 @@
10621085
"label": 4,
10631086
"nextInChain": 0
10641087
},
1088+
"WGPUQueueWorkDoneCallbackInfo": {
1089+
"__size__": 16,
1090+
"callback": 8,
1091+
"mode": 4,
1092+
"nextInChain": 0,
1093+
"userdata": 12
1094+
},
10651095
"WGPURenderBundleDescriptor": {
10661096
"__size__": 8,
10671097
"label": 4,
10681098
"nextInChain": 0
10691099
},
10701100
"WGPURenderBundleEncoderDescriptor": {
1071-
"__size__": 28,
1101+
"__size__": 32,
1102+
"colorFormatCount": 8,
10721103
"colorFormats": 12,
1073-
"colorFormatsCount": 8,
10741104
"depthReadOnly": 24,
10751105
"depthStencilFormat": 16,
10761106
"label": 4,
10771107
"nextInChain": 0,
10781108
"sampleCount": 20,
1079-
"stencilReadOnly": 25
1109+
"stencilReadOnly": 28
10801110
},
10811111
"WGPURenderPassColorAttachment": {
10821112
"__size__": 56,
@@ -1132,10 +1162,17 @@
11321162
"primitive": 40,
11331163
"vertex": 12
11341164
},
1165+
"WGPURequestAdapterCallbackInfo": {
1166+
"__size__": 16,
1167+
"callback": 8,
1168+
"mode": 4,
1169+
"nextInChain": 0,
1170+
"userdata": 12
1171+
},
11351172
"WGPURequestAdapterOptions": {
1136-
"__size__": 20,
1173+
"__size__": 24,
11371174
"backendType": 12,
1138-
"compatibilityMode": 17,
1175+
"compatibilityMode": 20,
11391176
"compatibleSurface": 4,
11401177
"forceFallbackAdapter": 16,
11411178
"nextInChain": 0,
@@ -1228,6 +1265,11 @@
12281265
"sampleType": 4,
12291266
"viewDimension": 8
12301267
},
1268+
"WGPUTextureBindingViewDimensionDescriptor": {
1269+
"__size__": 12,
1270+
"chain": 0,
1271+
"textureBindingViewDimension": 8
1272+
},
12311273
"WGPUTextureDataLayout": {
12321274
"__size__": 24,
12331275
"bytesPerRow": 16,

src/generated_struct_info64.json

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,13 @@
842842
"size": 24,
843843
"usage": 16
844844
},
845+
"WGPUBufferMapCallbackInfo": {
846+
"__size__": 32,
847+
"callback": 16,
848+
"mode": 8,
849+
"nextInChain": 0,
850+
"userdata": 24
851+
},
845852
"WGPUChainedStruct": {
846853
"__size__": 16,
847854
"next": 0,
@@ -936,8 +943,8 @@
936943
"deviceLostUserdata": 64,
937944
"label": 8,
938945
"nextInChain": 0,
946+
"requiredFeatureCount": 16,
939947
"requiredFeatures": 24,
940-
"requiredFeaturesCount": 16,
941948
"requiredLimits": 32
942949
},
943950
"WGPUExtent3D": {
@@ -956,6 +963,15 @@
956963
"targetCount": 40,
957964
"targets": 48
958965
},
966+
"WGPUFuture": {
967+
"__size__": 8,
968+
"id": 0
969+
},
970+
"WGPUFutureWaitInfo": {
971+
"__size__": 16,
972+
"completed": 8,
973+
"future": 0
974+
},
959975
"WGPUImageCopyBuffer": {
960976
"__size__": 40,
961977
"buffer": 32,
@@ -971,9 +987,16 @@
971987
"texture": 8
972988
},
973989
"WGPUInstanceDescriptor": {
974-
"__size__": 8,
990+
"__size__": 32,
991+
"features": 8,
975992
"nextInChain": 0
976993
},
994+
"WGPUInstanceFeatures": {
995+
"__size__": 24,
996+
"nextInChain": 0,
997+
"timedWaitAnyEnable": 8,
998+
"timedWaitAnyMaxCount": 16
999+
},
9771000
"WGPULimits": {
9781001
"__size__": 144,
9791002
"maxBindGroups": 16,
@@ -1062,21 +1085,28 @@
10621085
"label": 8,
10631086
"nextInChain": 0
10641087
},
1088+
"WGPUQueueWorkDoneCallbackInfo": {
1089+
"__size__": 32,
1090+
"callback": 16,
1091+
"mode": 8,
1092+
"nextInChain": 0,
1093+
"userdata": 24
1094+
},
10651095
"WGPURenderBundleDescriptor": {
10661096
"__size__": 16,
10671097
"label": 8,
10681098
"nextInChain": 0
10691099
},
10701100
"WGPURenderBundleEncoderDescriptor": {
10711101
"__size__": 48,
1102+
"colorFormatCount": 16,
10721103
"colorFormats": 24,
1073-
"colorFormatsCount": 16,
10741104
"depthReadOnly": 40,
10751105
"depthStencilFormat": 32,
10761106
"label": 8,
10771107
"nextInChain": 0,
10781108
"sampleCount": 36,
1079-
"stencilReadOnly": 41
1109+
"stencilReadOnly": 44
10801110
},
10811111
"WGPURenderPassColorAttachment": {
10821112
"__size__": 72,
@@ -1132,10 +1162,17 @@
11321162
"primitive": 80,
11331163
"vertex": 24
11341164
},
1165+
"WGPURequestAdapterCallbackInfo": {
1166+
"__size__": 32,
1167+
"callback": 16,
1168+
"mode": 8,
1169+
"nextInChain": 0,
1170+
"userdata": 24
1171+
},
11351172
"WGPURequestAdapterOptions": {
11361173
"__size__": 32,
11371174
"backendType": 20,
1138-
"compatibilityMode": 25,
1175+
"compatibilityMode": 28,
11391176
"compatibleSurface": 8,
11401177
"forceFallbackAdapter": 24,
11411178
"nextInChain": 0,
@@ -1228,6 +1265,11 @@
12281265
"sampleType": 8,
12291266
"viewDimension": 12
12301267
},
1268+
"WGPUTextureBindingViewDimensionDescriptor": {
1269+
"__size__": 24,
1270+
"chain": 0,
1271+
"textureBindingViewDimension": 16
1272+
},
12311273
"WGPUTextureDataLayout": {
12321274
"__size__": 24,
12331275
"bytesPerRow": 16,

0 commit comments

Comments
 (0)