diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 2c8d51d3..1979c70f 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,8 +1,3 @@ -typedef struct WGPUCommandEncoderDescriptor { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, -} WGPUCommandEncoderDescriptor; - typedef struct WGPUCompilationMessage { next_in_chain: *const ChainedStruct, char const * message; // nullable diff --git a/gpu/src/command_encoder.zig b/gpu/src/command_encoder.zig index 06794114..0fe51c85 100644 --- a/gpu/src/command_encoder.zig +++ b/gpu/src/command_encoder.zig @@ -1,6 +1,13 @@ +const ChainedStruct = @import("types.zig").ChainedStruct; + pub const CommandEncoder = enum(usize) { _, // TODO: verify there is a use case for nullable value of this type. pub const none: CommandEncoder = @intToEnum(CommandEncoder, 0); + + pub const Descriptor = struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, + }; };