gpu: make Device an enum with methods

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 00:13:54 -07:00 committed by Stephen Gutekanst
parent 62a991090a
commit 58602f7407
2 changed files with 10 additions and 6 deletions

View file

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