diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index cb0478eb..ecea952a 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,13 +1,3 @@ -typedef struct WGPUChainedStruct { - struct WGPUChainedStruct const * next; - WGPUSType sType; -} WGPUChainedStruct; - -typedef struct WGPUChainedStructOut { - struct WGPUChainedStructOut * next; - WGPUSType sType; -} WGPUChainedStructOut; - typedef struct WGPUAdapterProperties { WGPUChainedStructOut * nextInChain; uint32_t vendorID; diff --git a/gpu/src/types.zig b/gpu/src/types.zig index eb54119e..90b35c01 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -364,6 +364,16 @@ pub const ShaderStage = packed struct { } }; +pub const ChainedStruct = extern struct { + next: *const ChainedStruct, + s_type: SType, +}; + +pub const ChainedStructOut = extern struct { + next: *ChainedStructOut, + s_type: SType, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }