From 000989df5b1caef7d348b330e67221b70bec8994 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 30 Jul 2022 23:36:51 -0700 Subject: [PATCH] gpu: make remaining next_in_chain fields nullable Signed-off-by: Stephen Gutekanst --- gpu/src/types.zig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 0d237a1a..66479892 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -42,14 +42,16 @@ pub const RenderPassTimestampWrite = extern struct { }; pub const RequestAdapterOptions = extern struct { - next_in_chain: *const ChainedStruct, + // TODO: file a bug on Dawn, this is not marked as nullable but in fact is. + next_in_chain: ?*const ChainedStruct = null, compatible_surface: ?*Surface, power_preference: PowerPreference = .undef, force_fallback_adapter: bool = false, }; pub const ComputePassDescriptor = extern struct { - next_in_chain: *const ChainedStruct, + // TODO: file a bug on Dawn, this is not marked as nullable but in fact is. + next_in_chain: ?*const ChainedStruct = null, label: ?[*:0]const u8 = null, timestamp_write_count: u32 = 0, // TODO: file a bug on Dawn, this is not marked as nullable but in fact is. @@ -57,7 +59,8 @@ pub const ComputePassDescriptor = extern struct { }; pub const RenderPassDescriptor = extern struct { - next_in_chain: *const ChainedStruct, + // TODO: file a bug on Dawn, this is not marked as nullable but in fact is. + next_in_chain: ?*const ChainedStruct = null, label: ?[*:0]const u8 = null, color_attachment_count: u32, // TODO: file a bug on Dawn, this is not marked as nullable but in fact is.