From 684fffb2fb534e934c1f873cbeb7318f18ba21fb Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 15 Jul 2022 23:39:13 -0700 Subject: [PATCH] gpu: add dawn.InstanceDescriptor Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 6 ------ gpu/src/dawn.zig | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 2e092a1e..59c2f836 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,9 +1,3 @@ -typedef struct WGPUDawnInstanceDescriptor { - WGPUChainedStruct chain; - uint32_t additionalRuntimeSearchPathsCount; - const char* const * additionalRuntimeSearchPaths; -} WGPUDawnInstanceDescriptor; - typedef struct WGPUDawnTextureInternalUsageDescriptor { WGPUChainedStruct chain; WGPUTextureUsageFlags internalUsage; diff --git a/gpu/src/dawn.zig b/gpu/src/dawn.zig index f31517e6..fd44ae7a 100644 --- a/gpu/src/dawn.zig +++ b/gpu/src/dawn.zig @@ -11,3 +11,10 @@ pub const EncoderInternalUsageDescriptor = struct { chain: ChainedStruct, use_internal_usages: bool, }; + +pub const InstanceDescriptor = extern struct { + // TODO: file an issue on Dawn: why not named nextInChain? + chain: ChainedStruct, + additional_runtime_search_paths_count: u32, + additional_runtime_search_paths: [*]const u8, +};