From 0c1a15a80442a454cd2f52e5bca68b2e15f14456 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 24 Jul 2022 14:48:46 -0700 Subject: [PATCH] gpu: convert CommandBuffer from enum(usize) to *opaque Signed-off-by: Stephen Gutekanst --- gpu/src/command_buffer.zig | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/gpu/src/command_buffer.zig b/gpu/src/command_buffer.zig index 90685a6e..90798545 100644 --- a/gpu/src/command_buffer.zig +++ b/gpu/src/command_buffer.zig @@ -1,13 +1,8 @@ const ChainedStruct = @import("types.zig").ChainedStruct; -pub const CommandBuffer = enum(usize) { - _, +pub const CommandBuffer = *opaque {}; - // TODO: verify there is a use case for nullable value of this type. - pub const none: CommandBuffer = @intToEnum(CommandBuffer, 0); - - pub const Descriptor = extern struct { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, - }; +pub const CommandBufferDescriptor = extern struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, };