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,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue