gpu: make Queue an enum with methods
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
f521c4c9dd
commit
068b829384
2 changed files with 12 additions and 8 deletions
|
|
@ -1,8 +1,12 @@
|
|||
ptr: *anyopaque,
|
||||
pub const Queue = enum(usize) {
|
||||
_,
|
||||
|
||||
pub const WorkDoneStatus = enum(u32) {
|
||||
success = 0x00000000,
|
||||
err = 0x00000001,
|
||||
unknown = 0x00000002,
|
||||
device_lost = 0x00000003,
|
||||
pub const none: Queue = @intToEnum(Queue, 0);
|
||||
|
||||
pub const WorkDoneStatus = enum(u32) {
|
||||
success = 0x00000000,
|
||||
err = 0x00000001,
|
||||
unknown = 0x00000002,
|
||||
device_lost = 0x00000003,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub const ExternalTexture = @import("external_texture.zig").ExternalTexture;
|
|||
pub const Instance = @import("instance.zig").Instance;
|
||||
pub const PipelineLayout = @import("pipeline_layout.zig").PipelineLayout;
|
||||
pub const QuerySet = @import("query_set.zig").QuerySet;
|
||||
pub const Queue = @import("Queue.zig");
|
||||
pub const Queue = @import("queue.zig").Queue;
|
||||
pub const RenderBundle = @import("RenderBundle.zig");
|
||||
pub const RenderBundleEncoder = @import("RenderBundleEncoder.zig");
|
||||
pub const RenderPassEncoder = @import("RenderPassEncoder.zig");
|
||||
|
|
@ -50,7 +50,7 @@ test {
|
|||
refAllDecls(@import("instance.zig"));
|
||||
refAllDecls(@import("pipeline_layout.zig"));
|
||||
refAllDecls(@import("query_set.zig"));
|
||||
refAllDecls(@import("Queue.zig"));
|
||||
refAllDecls(@import("queue.zig"));
|
||||
refAllDecls(@import("RenderBundle.zig"));
|
||||
refAllDecls(@import("RenderBundleEncoder.zig"));
|
||||
refAllDecls(@import("RenderPassEncoder.zig"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue