gpu: correctly handle null RenderPipeline.Descriptor transitive values

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 19:58:18 -07:00 committed by Stephen Gutekanst
parent f5e6976937
commit 4e31e015a4
3 changed files with 32 additions and 30 deletions

View file

@ -79,7 +79,7 @@ pub const ProgrammableStageDescriptor = struct {
label: ?[*:0]const u8 = null,
module: ShaderModule,
entry_point: [*:0]const u8,
constants: []const ConstantEntry,
constants: ?[]const ConstantEntry,
};
pub const ComputePassTimestampWrite = struct {
@ -119,15 +119,15 @@ pub const RenderPassColorAttachment = struct {
pub const VertexState = struct {
module: ShaderModule,
entry_point: [*:0]const u8,
constants: []const ConstantEntry,
buffers: []const VertexBufferLayout,
constants: ?[]const ConstantEntry = null,
buffers: ?[]const VertexBufferLayout = null,
};
pub const FragmentState = struct {
module: ShaderModule,
entry_point: [*:0]const u8,
constants: []const ConstantEntry,
targets: []const ColorTargetState,
constants: ?[]const ConstantEntry = null,
targets: ?[]const ColorTargetState = null,
};
pub const ColorTargetState = extern struct {