diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 90461e2f..36a58ac4 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,7 +1,3 @@ -typedef struct WGPUInstanceDescriptor { - next_in_chain: *const ChainedStruct, -} WGPUInstanceDescriptor; - typedef struct WGPUMultisampleState { next_in_chain: *const ChainedStruct, count: u32, diff --git a/gpu/src/instance.zig b/gpu/src/instance.zig index 52e1890b..dfa1851b 100644 --- a/gpu/src/instance.zig +++ b/gpu/src/instance.zig @@ -1,6 +1,12 @@ +pub const ChainedStruct = @import("types.zig").ChainedStruct; + pub const Instance = enum(usize) { _, // TODO: verify there is a use case for nullable value of this type. pub const none: Instance = @intToEnum(Instance, 0); + + pub const Descriptor = extern struct { + next_in_chain: *const ChainedStruct, + }; };