gpu: make Instance an enum with methods
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
81b8caa48c
commit
1fefc7e66b
2 changed files with 7 additions and 3 deletions
|
|
@ -1 +1,5 @@
|
|||
ptr: *anyopaque,
|
||||
pub const Instance = enum(usize) {
|
||||
_,
|
||||
|
||||
pub const none: Instance = @intToEnum(Instance, 0);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ pub const ComputePassEncoder = @import("compute_pass_encoder.zig").ComputePassEn
|
|||
pub const ComputePipeline = @import("compute_pipeline.zig").ComputePipeline;
|
||||
pub const Device = @import("device.zig").Device;
|
||||
pub const ExternalTexture = @import("external_texture.zig").ExternalTexture;
|
||||
pub const Instance = @import("Instance.zig");
|
||||
pub const Instance = @import("instance.zig").Instance;
|
||||
pub const PipelineLayout = @import("PipelineLayout.zig");
|
||||
pub const QuerySet = @import("QuerySet.zig");
|
||||
pub const Queue = @import("Queue.zig");
|
||||
|
|
@ -47,7 +47,7 @@ test {
|
|||
refAllDecls(@import("compute_pipeline.zig"));
|
||||
refAllDecls(@import("device.zig"));
|
||||
refAllDecls(@import("external_texture.zig"));
|
||||
refAllDecls(@import("Instance.zig"));
|
||||
refAllDecls(@import("instance.zig"));
|
||||
refAllDecls(@import("PipelineLayout.zig"));
|
||||
refAllDecls(@import("QuerySet.zig"));
|
||||
refAllDecls(@import("Queue.zig"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue