gpu: internalize RenderBundleEncoder types

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-29 23:53:36 -07:00 committed by Stephen Gutekanst
parent b4830688bb
commit 836c46cc6c
3 changed files with 16 additions and 17 deletions

View file

@ -9,6 +9,18 @@ const IndexFormat = @import("types.zig").IndexFormat;
const Impl = @import("interface.zig").Impl;
pub const RenderBundleEncoder = opaque {
pub const Descriptor = extern struct {
next_in_chain: ?*const ChainedStruct = null,
label: ?[*:0]const u8 = null,
color_formats_count: u32,
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
color_formats: ?[*]const TextureFormat,
depth_stencil_format: TextureFormat = .undef,
sample_count: u32 = 1,
depth_read_only: bool = false,
stencil_read_only: bool = false,
};
/// Default `instance_count`: 1
/// Default `first_vertex`: 0
/// Default `first_instance`: 0
@ -82,15 +94,3 @@ pub const RenderBundleEncoder = opaque {
Impl.renderBundleEncoderRelease(render_bundle_encoder);
}
};
pub const RenderBundleEncoderDescriptor = extern struct {
next_in_chain: ?*const ChainedStruct = null,
label: ?[*:0]const u8 = null,
color_formats_count: u32,
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
color_formats: ?[*]const TextureFormat,
depth_stencil_format: TextureFormat = .undef,
sample_count: u32 = 1,
depth_read_only: bool = false,
stencil_read_only: bool = false,
};