gpu: make Device an enum with methods
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
62a991090a
commit
58602f7407
2 changed files with 10 additions and 6 deletions
|
|
@ -1,6 +1,10 @@
|
|||
ptr: *anyopaque,
|
||||
pub const Device = enum(usize) {
|
||||
_,
|
||||
|
||||
pub const LostReason = enum(u32) {
|
||||
undef = 0x00000000,
|
||||
destroyed = 0x00000001,
|
||||
pub const none: Device = @intToEnum(Device, 0);
|
||||
|
||||
pub const LostReason = enum(u32) {
|
||||
undef = 0x00000000,
|
||||
destroyed = 0x00000001,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue