gpu: add Device.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
286cbb6160
commit
8484d47e78
2 changed files with 14 additions and 9 deletions
|
|
@ -1,12 +1,3 @@
|
||||||
pub const WGPUDeviceDescriptor = extern struct {
|
|
||||||
next_in_chain: *const ChainedStruct,
|
|
||||||
label: ?[*:0]const u8 = null,
|
|
||||||
required_features_count: u32,
|
|
||||||
required_features: [*]const FeatureName,
|
|
||||||
required_limits: ?*const RequiredLimits = null, // nullable
|
|
||||||
default_queue: Queue.Descriptor,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const WGPURenderPassDescriptor = extern struct {
|
pub const WGPURenderPassDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||||
|
const FeatureName = @import("types.zig").FeatureName;
|
||||||
|
const RequiredLimits = @import("types.zig").RequiredLimits;
|
||||||
|
const Queue = @import("queue.zig").Queue;
|
||||||
|
|
||||||
pub const Device = enum(usize) {
|
pub const Device = enum(usize) {
|
||||||
_,
|
_,
|
||||||
|
|
||||||
|
|
@ -8,4 +13,13 @@ pub const Device = enum(usize) {
|
||||||
undef = 0x00000000,
|
undef = 0x00000000,
|
||||||
destroyed = 0x00000001,
|
destroyed = 0x00000001,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const Descriptor = extern struct {
|
||||||
|
next_in_chain: *const ChainedStruct,
|
||||||
|
label: ?[*:0]const u8 = null,
|
||||||
|
required_features_count: u32,
|
||||||
|
required_features: [*]const FeatureName,
|
||||||
|
required_limits: ?*const RequiredLimits = null, // nullable
|
||||||
|
default_queue: Queue.Descriptor,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue