From 97636ad2f69f754d368e780b75e0ff69f7931dd5 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Tue, 12 Nov 2024 01:15:20 -0800 Subject: [PATCH] Add missing WGPUCallbackModes (#402) These were missing just due to a typo in yml.go. --- gen/yml.go | 2 +- webgpu.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gen/yml.go b/gen/yml.go index 6af66d3c..3ed7c391 100644 --- a/gen/yml.go +++ b/gen/yml.go @@ -79,7 +79,7 @@ type ParameterType struct { type Callback struct { Name string `yaml:"name"` Doc string `yaml:"doc"` - Style string `yaml:"type"` + Style string `yaml:"style"` Args []ParameterType `yaml:"args"` } diff --git a/webgpu.h b/webgpu.h index 336fc7f1..da0bab52 100644 --- a/webgpu.h +++ b/webgpu.h @@ -1293,6 +1293,7 @@ typedef struct WGPUChainedStructOut { */ typedef struct WGPUBufferMapCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPUBufferMapCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2; @@ -1300,6 +1301,7 @@ typedef struct WGPUBufferMapCallbackInfo { typedef struct WGPUCompilationInfoCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPUCompilationInfoCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2; @@ -1307,6 +1309,7 @@ typedef struct WGPUCompilationInfoCallbackInfo { typedef struct WGPUCreateComputePipelineAsyncCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPUCreateComputePipelineAsyncCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2; @@ -1314,6 +1317,7 @@ typedef struct WGPUCreateComputePipelineAsyncCallbackInfo { typedef struct WGPUCreateRenderPipelineAsyncCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPUCreateRenderPipelineAsyncCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2; @@ -1321,6 +1325,7 @@ typedef struct WGPUCreateRenderPipelineAsyncCallbackInfo { typedef struct WGPUDeviceLostCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPUDeviceLostCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2; @@ -1328,6 +1333,7 @@ typedef struct WGPUDeviceLostCallbackInfo { typedef struct WGPUPopErrorScopeCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPUPopErrorScopeCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2; @@ -1335,6 +1341,7 @@ typedef struct WGPUPopErrorScopeCallbackInfo { typedef struct WGPUQueueWorkDoneCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPUQueueWorkDoneCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2; @@ -1342,6 +1349,7 @@ typedef struct WGPUQueueWorkDoneCallbackInfo { typedef struct WGPURequestAdapterCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPURequestAdapterCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2; @@ -1349,6 +1357,7 @@ typedef struct WGPURequestAdapterCallbackInfo { typedef struct WGPURequestDeviceCallbackInfo { WGPUChainedStruct const * nextInChain; + WGPUCallbackMode mode; WGPURequestDeviceCallback callback; WGPU_NULLABLE void* userdata1; WGPU_NULLABLE void* userdata2;