gpu: internalize PipelineLayout types

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-29 23:50:23 -07:00 committed by Stephen Gutekanst
parent 09bbc8458a
commit 1a57ae1c4d
3 changed files with 12 additions and 13 deletions

View file

@ -3,6 +3,14 @@ const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout;
const Impl = @import("interface.zig").Impl;
pub const PipelineLayout = opaque {
pub const Descriptor = extern struct {
next_in_chain: ?*const ChainedStruct = null,
label: ?[*:0]const u8 = null,
bind_group_layout_count: u32,
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
bind_group_layouts: ?[*]const *BindGroupLayout,
};
pub inline fn setLabel(pipeline_layout: *PipelineLayout, label: [*:0]const u8) void {
Impl.pipelineLayoutSetLabel(pipeline_layout, label);
}
@ -15,11 +23,3 @@ pub const PipelineLayout = opaque {
Impl.pipelineLayoutRelease(pipeline_layout);
}
};
pub const PipelineLayoutDescriptor = extern struct {
next_in_chain: ?*const ChainedStruct = null,
label: ?[*:0]const u8 = null,
bind_group_layout_count: u32,
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
bind_group_layouts: ?[*]const *BindGroupLayout,
};