gpu: add SwapChain.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
2273d2517e
commit
9ee22aeaa8
2 changed files with 15 additions and 11 deletions
|
|
@ -1,14 +1,3 @@
|
||||||
pub const WGPUSwapChainDescriptor = extern struct {
|
|
||||||
next_in_chain: *const ChainedStruct,
|
|
||||||
label: ?[*:0]const u8 = null,
|
|
||||||
usage: TextureUsageFlags,
|
|
||||||
format: TextureFormat,
|
|
||||||
width: u32,
|
|
||||||
height: u32,
|
|
||||||
present_mode: PresentMode,
|
|
||||||
implementation: u64,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const WGPUTextureBindingLayout = extern struct {
|
pub const WGPUTextureBindingLayout = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
sample_type: TextureSampleType,
|
sample_type: TextureSampleType,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,21 @@
|
||||||
|
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||||
|
const PresentMode = @import("types.zig").PresentMode;
|
||||||
|
const Texture = @import("texture.zig").Texture;
|
||||||
|
|
||||||
pub const SwapChain = enum(usize) {
|
pub const SwapChain = enum(usize) {
|
||||||
_,
|
_,
|
||||||
|
|
||||||
// TODO: verify there is a use case for nullable value of this type.
|
// TODO: verify there is a use case for nullable value of this type.
|
||||||
pub const none: SwapChain = @intToEnum(SwapChain, 0);
|
pub const none: SwapChain = @intToEnum(SwapChain, 0);
|
||||||
|
|
||||||
|
pub const Descriptor = extern struct {
|
||||||
|
next_in_chain: *const ChainedStruct,
|
||||||
|
label: ?[*:0]const u8 = null,
|
||||||
|
usage: Texture.UsageFlags,
|
||||||
|
format: Texture.Format,
|
||||||
|
width: u32,
|
||||||
|
height: u32,
|
||||||
|
present_mode: PresentMode,
|
||||||
|
implementation: u64,
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue