gpu: update defaults/optionality for RenderPassDescriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-27 09:47:58 -07:00 committed by Stephen Gutekanst
parent 08f8534d1d
commit 835f93fb53

View file

@ -114,11 +114,11 @@ pub const RenderPassDescriptor = extern struct {
color_attachment_count: u32,
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
color_attachments: ?[*]const types.RenderPassColorAttachment,
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment = null,
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment,
occlusion_query_set: ?query_set.QuerySet,
timestamp_write_count: u32,
timestamp_write_count: u32 = 0,
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
timestamp_writes: ?[*]const RenderPassTimestampWrite,
timestamp_writes: ?[*]const RenderPassTimestampWrite = null,
};
pub inline fn createInstance(descriptor: ?*const instance.InstanceDescriptor) ?instance.Instance {