gpu: make BindGroup an enum with methods

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 00:05:45 -07:00 committed by Stephen Gutekanst
parent f343326184
commit 138847d425
3 changed files with 7 additions and 3 deletions

View file

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

5
gpu/src/bind_group.zig Normal file
View file

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

View file

@ -10,7 +10,7 @@ pub const whole_map_size = std.math.maxInt(usize);
pub const whole_size = 0xffffffffffffffff;
pub const Adapter = @import("adapter.zig").Adapter;
pub const BindGroup = @import("BindGroup.zig");
pub const BindGroup = @import("bind_group.zig").BindGroup;
pub const BindGroupLayout = @import("BindGroupLayout.zig");
pub const Buffer = @import("buffer.zig").Buffer;
pub const CommandBuffer = @import("CommandBuffer.zig");
@ -38,7 +38,7 @@ pub const AlphaMode = @import("types.zig").AlphaMode;
test {
refAllDecls(@import("adapter.zig"));
refAllDecls(@import("BindGroup.zig"));
refAllDecls(@import("bind_group.zig"));
refAllDecls(@import("BindGroupLayout.zig"));
refAllDecls(@import("buffer.zig"));
refAllDecls(@import("CommandBuffer.zig"));