gpu: convert Queue from enum(usize) to *opaque
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
3d0051e720
commit
8932f53841
2 changed files with 13 additions and 17 deletions
|
|
@ -2,6 +2,7 @@ const ChainedStruct = @import("types.zig").ChainedStruct;
|
|||
const FeatureName = @import("types.zig").FeatureName;
|
||||
const RequiredLimits = @import("types.zig").RequiredLimits;
|
||||
const Queue = @import("queue.zig").Queue;
|
||||
const QueueDescriptor = @import("queue.zig").QueueDescriptor;
|
||||
|
||||
pub const Device = *opaque {};
|
||||
|
||||
|
|
@ -16,5 +17,5 @@ pub const DeviceDescriptor = extern struct {
|
|||
required_features_count: u32,
|
||||
required_features: [*]const FeatureName,
|
||||
required_limits: ?*const RequiredLimits = null, // nullable
|
||||
default_queue: Queue.Descriptor,
|
||||
default_queue: QueueDescriptor,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,20 +1,15 @@
|
|||
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||
|
||||
pub const Queue = enum(usize) {
|
||||
_,
|
||||
pub const Queue = *opaque {};
|
||||
|
||||
// TODO: verify there is a use case for nullable value of this type.
|
||||
pub const none: Queue = @intToEnum(Queue, 0);
|
||||
|
||||
pub const WorkDoneStatus = enum(u32) {
|
||||
success = 0x00000000,
|
||||
err = 0x00000001,
|
||||
unknown = 0x00000002,
|
||||
device_lost = 0x00000003,
|
||||
};
|
||||
|
||||
pub const Descriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
};
|
||||
pub const QueueWorkDoneStatus = enum(u32) {
|
||||
success = 0x00000000,
|
||||
err = 0x00000001,
|
||||
unknown = 0x00000002,
|
||||
device_lost = 0x00000003,
|
||||
};
|
||||
|
||||
pub const QueueDescriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue