gpu: improve optional handling

Helps hexops/mach#182
This commit is contained in:
Andrew Gutekanst 2022-04-12 21:14:31 -04:00 committed by Stephen Gutekanst
parent 9489fe7083
commit 9e945ce951
8 changed files with 53 additions and 49 deletions

View file

@ -69,7 +69,7 @@ pub const ProgrammableStageDescriptor = struct {
label: ?[*:0]const u8 = null,
module: ShaderModule,
entry_point: [*:0]const u8,
constants: ?[]const ConstantEntry,
constants: ?[]const ConstantEntry = null,
};
pub const ComputePassTimestampWrite = struct {
@ -123,7 +123,7 @@ pub const FragmentState = struct {
pub const ColorTargetState = extern struct {
reserved: ?*anyopaque = null,
format: Texture.Format,
blend: *const BlendState,
blend: ?*const BlendState = null,
write_mask: ColorWriteMask = ColorWriteMask.all,
};