From 9c7c8c00bfa6fb170142b8491c902c44c1504722 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Wed, 27 Jul 2022 09:41:45 -0700 Subject: [PATCH] gpu: update defaults/optionality for DepthStencilState Signed-off-by: Stephen Gutekanst --- gpu/src/types.zig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 3962b3be..91c13c98 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -549,15 +549,15 @@ pub const CompilationInfo = extern struct { pub const DepthStencilState = extern struct { next_in_chain: *const ChainedStruct, format: TextureFormat, - depth_write_enabled: bool, - depth_compare: CompareFunction, + depth_write_enabled: bool = false, + depth_compare: CompareFunction = .always, stencil_front: StencilFaceState, stencil_back: StencilFaceState, - stencil_read_mask: u32, - stencil_write_mask: u32, - depth_bias: i32, - depth_bias_slope_scale: f32, - depth_bias_clamp: f32, + stencil_read_mask: u32 = 0xFFFFFFFF, + stencil_write_mask: u32 = 0xFFFFFFFF, + depth_bias: i32 = 0, + depth_bias_slope_scale: f32 = 0.0, + depth_bias_clamp: f32 = 0.0, }; pub const ImageCopyBuffer = extern struct {