gpu: adopt new dawn.json policy for optionality of slice fields, default zero values

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-11 03:44:34 -07:00 committed by Stephen Gutekanst
parent 2b354f9226
commit 726bdf3fba
13 changed files with 40 additions and 63 deletions

View file

@ -6,9 +6,8 @@ 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,
bind_group_layout_count: u32 = 0,
bind_group_layouts: ?[*]const *BindGroupLayout = null,
};
pub inline fn setLabel(pipeline_layout: *PipelineLayout, label: [*:0]const u8) void {