From ce124cbc2e50ab2edf2c5fd5b489bfa1ba20bdd3 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 22 Nov 2019 12:55:06 +0000 Subject: [PATCH] Add sensible defaults for depth-stencil state in vulkan helpers --- util/test/demos/vk/vk_helpers.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/util/test/demos/vk/vk_helpers.cpp b/util/test/demos/vk/vk_helpers.cpp index 9786ec3c2..35d5f6805 100644 --- a/util/test/demos/vk/vk_helpers.cpp +++ b/util/test/demos/vk/vk_helpers.cpp @@ -167,6 +167,16 @@ GraphicsPipelineCreateInfo::GraphicsPipelineCreateInfo() depthStencilState = VkPipelineDepthStencilStateCreateInfo(); depthStencilState.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; + depthStencilState.depthCompareOp = VK_COMPARE_OP_LESS_OR_EQUAL; + depthStencilState.minDepthBounds = 0.0f; + depthStencilState.maxDepthBounds = 1.0f; + depthStencilState.front.compareMask = 0xff; + depthStencilState.front.writeMask = 0xff; + depthStencilState.front.compareOp = VK_COMPARE_OP_EQUAL; + depthStencilState.front.passOp = VK_STENCIL_OP_REPLACE; + depthStencilState.front.failOp = VK_STENCIL_OP_KEEP; + depthStencilState.front.depthFailOp = VK_STENCIL_OP_KEEP; + depthStencilState.back = depthStencilState.front; colorBlendState.attachments.push_back({ // blendEnable