Skip to content

Commit

Permalink
WebGPU: update to dawn@acd91e (#19659)
Browse files Browse the repository at this point in the history
* WebGPU: update to dawn@acd91e

* gen_struct_info

* device lost callback fix

* fix deprecated, chain struct

* rebaseline

* add new functions and gen_sig_info

* fix wgpuBufferGetMapState bufferId param
  • Loading branch information
shrekshao authored Jun 23, 2023
1 parent 9f9abed commit 412fd75
Show file tree
Hide file tree
Showing 10 changed files with 1,043 additions and 779 deletions.
72 changes: 41 additions & 31 deletions src/generated_struct_info32.json
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,11 @@
"patch": 2
},
"WGPUAdapterProperties": {
"__size__": 36,
"__size__": 40,
"adapterType": 28,
"architecture": 12,
"backendType": 32,
"compatibilityMode": 36,
"deviceID": 16,
"driverDescription": 24,
"name": 20,
Expand Down Expand Up @@ -890,14 +891,17 @@
"nextInChain": 0
},
"WGPUCompilationMessage": {
"__size__": 48,
"__size__": 72,
"length": 40,
"lineNum": 16,
"linePos": 24,
"message": 4,
"nextInChain": 0,
"offset": 32,
"type": 8
"type": 8,
"utf16Length": 64,
"utf16LinePos": 48,
"utf16Offset": 56
},
"WGPUComputePassDescriptor": {
"__size__": 16,
Expand Down Expand Up @@ -940,8 +944,10 @@
"stencilWriteMask": 52
},
"WGPUDeviceDescriptor": {
"__size__": 28,
"__size__": 36,
"defaultQueue": 20,
"deviceLostCallback": 28,
"deviceLostUserdata": 32,
"label": 4,
"nextInChain": 0,
"requiredFeatures": 12,
Expand Down Expand Up @@ -983,35 +989,38 @@
"nextInChain": 0
},
"WGPULimits": {
"__size__": 120,
"__size__": 144,
"maxBindGroups": 16,
"maxColorAttachments": 92,
"maxComputeInvocationsPerWorkgroup": 100,
"maxComputeWorkgroupSizeX": 104,
"maxComputeWorkgroupSizeY": 108,
"maxComputeWorkgroupSizeZ": 112,
"maxComputeWorkgroupStorageSize": 96,
"maxComputeWorkgroupsPerDimension": 116,
"maxDynamicStorageBuffersPerPipelineLayout": 24,
"maxDynamicUniformBuffersPerPipelineLayout": 20,
"maxInterStageShaderComponents": 84,
"maxInterStageShaderVariables": 88,
"maxSampledTexturesPerShaderStage": 28,
"maxSamplersPerShaderStage": 32,
"maxStorageBufferBindingSize": 56,
"maxStorageBuffersPerShaderStage": 36,
"maxStorageTexturesPerShaderStage": 40,
"maxBindingsPerBindGroup": 20,
"maxBufferSize": 88,
"maxColorAttachmentBytesPerSample": 116,
"maxColorAttachments": 112,
"maxComputeInvocationsPerWorkgroup": 124,
"maxComputeWorkgroupSizeX": 128,
"maxComputeWorkgroupSizeY": 132,
"maxComputeWorkgroupSizeZ": 136,
"maxComputeWorkgroupStorageSize": 120,
"maxComputeWorkgroupsPerDimension": 140,
"maxDynamicStorageBuffersPerPipelineLayout": 28,
"maxDynamicUniformBuffersPerPipelineLayout": 24,
"maxInterStageShaderComponents": 104,
"maxInterStageShaderVariables": 108,
"maxSampledTexturesPerShaderStage": 32,
"maxSamplersPerShaderStage": 36,
"maxStorageBufferBindingSize": 64,
"maxStorageBuffersPerShaderStage": 40,
"maxStorageTexturesPerShaderStage": 44,
"maxTextureArrayLayers": 12,
"maxTextureDimension1D": 0,
"maxTextureDimension2D": 4,
"maxTextureDimension3D": 8,
"maxUniformBufferBindingSize": 48,
"maxUniformBuffersPerShaderStage": 44,
"maxVertexAttributes": 76,
"maxVertexBufferArrayStride": 80,
"maxVertexBuffers": 72,
"minStorageBufferOffsetAlignment": 68,
"minUniformBufferOffsetAlignment": 64
"maxUniformBufferBindingSize": 56,
"maxUniformBuffersPerShaderStage": 48,
"maxVertexAttributes": 96,
"maxVertexBufferArrayStride": 100,
"maxVertexBuffers": 80,
"minStorageBufferOffsetAlignment": 76,
"minUniformBufferOffsetAlignment": 72
},
"WGPUMultisampleState": {
"__size__": 16,
Expand Down Expand Up @@ -1139,13 +1148,14 @@
},
"WGPURequestAdapterOptions": {
"__size__": 16,
"compatibilityMode": 13,
"compatibleSurface": 4,
"forceFallbackAdapter": 12,
"nextInChain": 0,
"powerPreference": 8
},
"WGPURequiredLimits": {
"__size__": 128,
"__size__": 152,
"limits": 8,
"nextInChain": 0
},
Expand Down Expand Up @@ -1183,7 +1193,7 @@
"WGPUShaderModuleWGSLDescriptor": {
"__size__": 12,
"chain": 0,
"source": 8
"code": 8
},
"WGPUStencilFaceState": {
"__size__": 16,
Expand All @@ -1200,7 +1210,7 @@
"viewDimension": 12
},
"WGPUSupportedLimits": {
"__size__": 128,
"__size__": 152,
"limits": 8,
"nextInChain": 0
},
Expand Down
78 changes: 44 additions & 34 deletions src/generated_struct_info64.json
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,11 @@
"patch": 2
},
"WGPUAdapterProperties": {
"__size__": 64,
"__size__": 72,
"adapterType": 56,
"architecture": 24,
"backendType": 60,
"compatibilityMode": 64,
"deviceID": 32,
"driverDescription": 48,
"name": 40,
Expand Down Expand Up @@ -890,14 +891,17 @@
"nextInChain": 0
},
"WGPUCompilationMessage": {
"__size__": 56,
"__size__": 80,
"length": 48,
"lineNum": 24,
"linePos": 32,
"message": 8,
"nextInChain": 0,
"offset": 40,
"type": 16
"type": 16,
"utf16Length": 72,
"utf16LinePos": 56,
"utf16Offset": 64
},
"WGPUComputePassDescriptor": {
"__size__": 32,
Expand Down Expand Up @@ -940,8 +944,10 @@
"stencilWriteMask": 56
},
"WGPUDeviceDescriptor": {
"__size__": 56,
"__size__": 72,
"defaultQueue": 40,
"deviceLostCallback": 56,
"deviceLostUserdata": 64,
"label": 8,
"nextInChain": 0,
"requiredFeatures": 24,
Expand Down Expand Up @@ -983,35 +989,38 @@
"nextInChain": 0
},
"WGPULimits": {
"__size__": 120,
"__size__": 144,
"maxBindGroups": 16,
"maxColorAttachments": 92,
"maxComputeInvocationsPerWorkgroup": 100,
"maxComputeWorkgroupSizeX": 104,
"maxComputeWorkgroupSizeY": 108,
"maxComputeWorkgroupSizeZ": 112,
"maxComputeWorkgroupStorageSize": 96,
"maxComputeWorkgroupsPerDimension": 116,
"maxDynamicStorageBuffersPerPipelineLayout": 24,
"maxDynamicUniformBuffersPerPipelineLayout": 20,
"maxInterStageShaderComponents": 84,
"maxInterStageShaderVariables": 88,
"maxSampledTexturesPerShaderStage": 28,
"maxSamplersPerShaderStage": 32,
"maxStorageBufferBindingSize": 56,
"maxStorageBuffersPerShaderStage": 36,
"maxStorageTexturesPerShaderStage": 40,
"maxBindingsPerBindGroup": 20,
"maxBufferSize": 88,
"maxColorAttachmentBytesPerSample": 116,
"maxColorAttachments": 112,
"maxComputeInvocationsPerWorkgroup": 124,
"maxComputeWorkgroupSizeX": 128,
"maxComputeWorkgroupSizeY": 132,
"maxComputeWorkgroupSizeZ": 136,
"maxComputeWorkgroupStorageSize": 120,
"maxComputeWorkgroupsPerDimension": 140,
"maxDynamicStorageBuffersPerPipelineLayout": 28,
"maxDynamicUniformBuffersPerPipelineLayout": 24,
"maxInterStageShaderComponents": 104,
"maxInterStageShaderVariables": 108,
"maxSampledTexturesPerShaderStage": 32,
"maxSamplersPerShaderStage": 36,
"maxStorageBufferBindingSize": 64,
"maxStorageBuffersPerShaderStage": 40,
"maxStorageTexturesPerShaderStage": 44,
"maxTextureArrayLayers": 12,
"maxTextureDimension1D": 0,
"maxTextureDimension2D": 4,
"maxTextureDimension3D": 8,
"maxUniformBufferBindingSize": 48,
"maxUniformBuffersPerShaderStage": 44,
"maxVertexAttributes": 76,
"maxVertexBufferArrayStride": 80,
"maxVertexBuffers": 72,
"minStorageBufferOffsetAlignment": 68,
"minUniformBufferOffsetAlignment": 64
"maxUniformBufferBindingSize": 56,
"maxUniformBuffersPerShaderStage": 48,
"maxVertexAttributes": 96,
"maxVertexBufferArrayStride": 100,
"maxVertexBuffers": 80,
"minStorageBufferOffsetAlignment": 76,
"minUniformBufferOffsetAlignment": 72
},
"WGPUMultisampleState": {
"__size__": 24,
Expand Down Expand Up @@ -1139,13 +1148,14 @@
},
"WGPURequestAdapterOptions": {
"__size__": 24,
"compatibilityMode": 21,
"compatibleSurface": 8,
"forceFallbackAdapter": 20,
"nextInChain": 0,
"powerPreference": 16
},
"WGPURequiredLimits": {
"__size__": 128,
"__size__": 152,
"limits": 8,
"nextInChain": 0
},
Expand Down Expand Up @@ -1183,7 +1193,7 @@
"WGPUShaderModuleWGSLDescriptor": {
"__size__": 24,
"chain": 0,
"source": 16
"code": 16
},
"WGPUStencilFaceState": {
"__size__": 16,
Expand All @@ -1200,7 +1210,7 @@
"viewDimension": 16
},
"WGPUSupportedLimits": {
"__size__": 128,
"__size__": 152,
"limits": 8,
"nextInChain": 0
},
Expand Down Expand Up @@ -1270,10 +1280,10 @@
"shaderLocation": 16
},
"WGPUVertexBufferLayout": {
"__size__": 24,
"__size__": 32,
"arrayStride": 0,
"attributeCount": 12,
"attributes": 16,
"attributeCount": 16,
"attributes": 24,
"stepMode": 8
},
"WGPUVertexState": {
Expand Down
15 changes: 8 additions & 7 deletions src/library_sigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,7 @@ sigs = {
wgpuBindGroupSetLabel__sig: 'vpp',
wgpuBufferDestroy__sig: 'vp',
wgpuBufferGetConstMappedRange__sig: 'pppp',
wgpuBufferGetMapState__sig: 'ip',
wgpuBufferGetMappedRange__sig: 'pppp',
wgpuBufferGetSize__sig: 'jp',
wgpuBufferGetUsage__sig: 'ip',
Expand Down Expand Up @@ -1578,7 +1579,7 @@ sigs = {
wgpuComputePassEncoderPushDebugGroup__sig: 'vpp',
wgpuComputePassEncoderReference__sig: 'vp',
wgpuComputePassEncoderRelease__sig: 'vp',
wgpuComputePassEncoderSetBindGroup__sig: 'vpipip',
wgpuComputePassEncoderSetBindGroup__sig: 'vpippp',
wgpuComputePassEncoderSetLabel__sig: 'vpp',
wgpuComputePassEncoderSetPipeline__sig: 'vpp',
wgpuComputePassEncoderWriteTimestamp__sig: 'vppi',
Expand Down Expand Up @@ -1607,11 +1608,10 @@ sigs = {
wgpuDeviceGetLimits__sig: 'ipp',
wgpuDeviceGetQueue__sig: 'pp',
wgpuDeviceHasFeature__sig: 'ipi',
wgpuDevicePopErrorScope__sig: 'ippp',
wgpuDevicePopErrorScope__sig: 'vppp',
wgpuDevicePushErrorScope__sig: 'vpi',
wgpuDeviceReference__sig: 'vp',
wgpuDeviceRelease__sig: 'vp',
wgpuDeviceSetDeviceLostCallback__sig: 'vppp',
wgpuDeviceSetLabel__sig: 'vpp',
wgpuDeviceSetUncapturedErrorCallback__sig: 'vppp',
wgpuGetProcAddress__sig: 'ppp',
Expand All @@ -1633,7 +1633,7 @@ sigs = {
wgpuQueueReference__sig: 'vp',
wgpuQueueRelease__sig: 'vp',
wgpuQueueSetLabel__sig: 'vpp',
wgpuQueueSubmit__sig: 'vpip',
wgpuQueueSubmit__sig: 'vppp',
wgpuQueueWriteBuffer__sig: 'vppjpp',
wgpuQueueWriteTexture__sig: 'vpppppp',
wgpuRenderBundleEncoderDraw__sig: 'vpiiii',
Expand All @@ -1646,13 +1646,14 @@ sigs = {
wgpuRenderBundleEncoderPushDebugGroup__sig: 'vpp',
wgpuRenderBundleEncoderReference__sig: 'vp',
wgpuRenderBundleEncoderRelease__sig: 'vp',
wgpuRenderBundleEncoderSetBindGroup__sig: 'vpipip',
wgpuRenderBundleEncoderSetBindGroup__sig: 'vpippp',
wgpuRenderBundleEncoderSetIndexBuffer__sig: 'vppijj',
wgpuRenderBundleEncoderSetLabel__sig: 'vpp',
wgpuRenderBundleEncoderSetPipeline__sig: 'vpp',
wgpuRenderBundleEncoderSetVertexBuffer__sig: 'vpipjj',
wgpuRenderBundleReference__sig: 'vp',
wgpuRenderBundleRelease__sig: 'vp',
wgpuRenderBundleSetLabel__sig: 'vpp',
wgpuRenderPassEncoderBeginOcclusionQuery__sig: 'vpi',
wgpuRenderPassEncoderBeginPipelineStatisticsQuery__sig: 'vppi',
wgpuRenderPassEncoderDraw__sig: 'vpiiii',
Expand All @@ -1662,13 +1663,13 @@ sigs = {
wgpuRenderPassEncoderEnd__sig: 'vp',
wgpuRenderPassEncoderEndOcclusionQuery__sig: 'vp',
wgpuRenderPassEncoderEndPipelineStatisticsQuery__sig: 'vp',
wgpuRenderPassEncoderExecuteBundles__sig: 'vpip',
wgpuRenderPassEncoderExecuteBundles__sig: 'vppp',
wgpuRenderPassEncoderInsertDebugMarker__sig: 'vpp',
wgpuRenderPassEncoderPopDebugGroup__sig: 'vp',
wgpuRenderPassEncoderPushDebugGroup__sig: 'vpp',
wgpuRenderPassEncoderReference__sig: 'vp',
wgpuRenderPassEncoderRelease__sig: 'vp',
wgpuRenderPassEncoderSetBindGroup__sig: 'vpipip',
wgpuRenderPassEncoderSetBindGroup__sig: 'vpippp',
wgpuRenderPassEncoderSetBlendConstant__sig: 'vpp',
wgpuRenderPassEncoderSetIndexBuffer__sig: 'vppijj',
wgpuRenderPassEncoderSetLabel__sig: 'vpp',
Expand Down
Loading

0 comments on commit 412fd75

Please sign in to comment.