Skip to content

Commit 80ba6f4

Browse files
committed
Added boolean for enabling/disabling depth stencil configurations
1 parent 7f76881 commit 80ba6f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vulkan-cpp/pipeline.cppm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export namespace vk {
9292
rasterization_state rasterization;
9393
multisample_state multisample;
9494
color_blend_state color_blend;
95+
bool depth_stencil_enabled = false;
9596
depth_stencil_state depth_stencil;
9697
std::span<dynamic_state> dynamic_states = {};
9798
};
@@ -289,7 +290,7 @@ export namespace vk {
289290
.pMultisampleState = &multisampling_ci,
290291
.pDepthStencilState = &pipeline_deth_stencil_state_ci,
291292
.pColorBlendState = &color_blending_ci,
292-
.pDynamicState = &dynamic_state_ci,
293+
.pDynamicState = (p_info.depth_stencil_enabled) ? &dynamic_state_ci : nullptr,
293294
.layout = m_pipeline_layout,
294295
.renderPass = p_info.renderpass,
295296
.subpass = 0,

0 commit comments

Comments
 (0)