gpu: add RenderBundleEncoder.Descriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-16 19:57:25 -07:00 committed by Stephen Gutekanst
parent c0d782bd9c
commit 8320b4e1bc
2 changed files with 14 additions and 11 deletions

View file

@ -1,14 +1,3 @@
pub const WGPURenderBundleEncoderDescriptor = extern struct {
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
color_formats_count: u32,
color_formats: [*]const TextureFormat,
depth_stencil_format: TextureFormat,
sample_count: u32,
depth_read_only: bool,
stencil_read_only: bool,
};
pub const WGPURenderPassDepthStencilAttachment = extern struct {
view: TextureView,
depth_load_op: LoadOp,

View file

@ -1,6 +1,20 @@
const ChainedStruct = @import("types.zig").ChainedStruct;
const Texture = @import("texture.zig").Texture;
pub const RenderBundleEncoder = enum(usize) {
_,
// TODO: verify there is a use case for nullable value of this type.
pub const none: RenderBundleEncoder = @intToEnum(RenderBundleEncoder, 0);
pub const Descriptor = extern struct {
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
color_formats_count: u32,
color_formats: [*]const Texture.Format,
depth_stencil_format: Texture.Format,
sample_count: u32,
depth_read_only: bool,
stencil_read_only: bool,
};
};