gpu: make Queue an enum with methods

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 00:18:32 -07:00 committed by Stephen Gutekanst
parent f521c4c9dd
commit 068b829384
2 changed files with 12 additions and 8 deletions

View file

@ -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,
};
};