From 7d14a98e1f4330bc65b345dad6672e800ed2fa25 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Wed, 27 Jul 2022 09:45:00 -0700 Subject: [PATCH] gpu: update defaults/optionality for VertexState Signed-off-by: Stephen Gutekanst --- gpu/src/types.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gpu/src/types.zig b/gpu/src/types.zig index ccfcc827..ac203c63 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -621,12 +621,12 @@ pub const VertexState = extern struct { next_in_chain: *const ChainedStruct, module: ShaderModule, entry_point: [*:0]const u8, - constant_count: u32, + constant_count: u32 = 0, // TODO: file a bug on Dawn, this is not marked as nullable but in fact is. - constants: ?[*]const ConstantEntry, - buffer_count: u32, + constants: ?[*]const ConstantEntry = null, + buffer_count: u32 = 0, // TODO: file a bug on Dawn, this is not marked as nullable but in fact is. - buffers: ?[*]const VertexBufferLayout, + buffers: ?[*]const VertexBufferLayout = null, }; pub const FragmentState = extern struct {