diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 4c17603e..fa2c63c4 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,8 +1,3 @@ -typedef struct WGPUCommandBufferDescriptor { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, -} WGPUCommandBufferDescriptor; - typedef struct WGPUCommandEncoderDescriptor { next_in_chain: *const ChainedStruct, label: ?[*:0]const u8 = null, diff --git a/gpu/src/command_buffer.zig b/gpu/src/command_buffer.zig index f8354a07..23b5ac0c 100644 --- a/gpu/src/command_buffer.zig +++ b/gpu/src/command_buffer.zig @@ -1,6 +1,13 @@ +const ChainedStruct = @import("types.zig").ChainedStruct; + pub const CommandBuffer = enum(usize) { _, // TODO: verify there is a use case for nullable value of this type. pub const none: CommandBuffer = @intToEnum(CommandBuffer, 0); + + pub const Descriptor = struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, + }; };