Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions src/sysgpu/vulkan.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3181,18 +3181,16 @@ pub const RenderPassEncoder = struct {
} else null,
});

if (attach.load_op == .clear) {
try clear_values.append(.{
.color = .{
.float_32 = [4]f32{
@floatCast(attach.clear_value.r),
@floatCast(attach.clear_value.g),
@floatCast(attach.clear_value.b),
@floatCast(attach.clear_value.a),
},
try clear_values.append(.{
.color = .{
.float_32 = [4]f32{
@floatCast(attach.clear_value.r),
@floatCast(attach.clear_value.g),
@floatCast(attach.clear_value.b),
@floatCast(attach.clear_value.a),
},
});
}
},
});

extent = view.extent;
}
Expand All @@ -3216,14 +3214,12 @@ pub const RenderPassEncoder = struct {
.read_only = attach.depth_read_only == .true or attach.stencil_read_only == .true,
};

if (attach.depth_load_op == .clear or attach.stencil_load_op == .clear) {
try clear_values.append(.{
.depth_stencil = .{
.depth = attach.depth_clear_value,
.stencil = attach.stencil_clear_value,
},
});
}
try clear_values.append(.{
.depth_stencil = .{
.depth = attach.depth_clear_value,
.stencil = attach.stencil_clear_value,
},
});

extent = view.extent;
}
Expand Down
Loading