gpu: make CommandBuffer an enum with methods

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 00:07:29 -07:00 committed by Stephen Gutekanst
parent 7563a18ca3
commit 9ff6409d73
3 changed files with 7 additions and 3 deletions

View file

@ -1 +0,0 @@
ptr: *anyopaque,

View file

@ -0,0 +1,5 @@
pub const CommandBuffer = enum(usize) {
_,
pub const none: CommandBuffer = @intToEnum(CommandBuffer, 0);
};

View file

@ -13,7 +13,7 @@ pub const Adapter = @import("adapter.zig").Adapter;
pub const BindGroup = @import("bind_group.zig").BindGroup;
pub const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout;
pub const Buffer = @import("buffer.zig").Buffer;
pub const CommandBuffer = @import("CommandBuffer.zig");
pub const CommandBuffer = @import("command_buffer.zig").CommandBuffer;
pub const CommandEncoder = @import("CommandEncoder.zig");
pub const ComputePassEncoder = @import("ComputePassEncoder.zig");
pub const ComputePipeline = @import("ComputePipeline.zig");
@ -41,7 +41,7 @@ test {
refAllDecls(@import("bind_group.zig"));
refAllDecls(@import("bind_group_layout.zig"));
refAllDecls(@import("buffer.zig"));
refAllDecls(@import("CommandBuffer.zig"));
refAllDecls(@import("command_buffer.zig"));
refAllDecls(@import("CommandEncoder.zig"));
refAllDecls(@import("ComputePassEncoder.zig"));
refAllDecls(@import("ComputePipeline.zig"));