From 7c15e824842ca4fd8c6279b805ba41f788693ebe Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Fri, 6 Oct 2023 08:43:05 -0400 Subject: define VkPipelineDepthStencilStateCreateInfo for the present graphics pipeline --- src/window.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index 10e263c..2f97be6 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -947,7 +947,19 @@ void CreateGraphicsPipeline() { multisampling.alphaToOneEnable = VK_FALSE; // TODO - VkPipelineDepthStencilStateCreateInfo *depthStencilInfo = nullptr; + VkPipelineDepthStencilStateCreateInfo depthStencilInfo{}; + depthStencilInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; + depthStencilInfo.pNext = nullptr; + depthStencilInfo.flags = 0; + depthStencilInfo.depthTestEnable = VK_FALSE; + depthStencilInfo.depthWriteEnable = VK_FALSE; + depthStencilInfo.depthCompareOp = VK_COMPARE_OP_LESS; + depthStencilInfo.depthBoundsTestEnable = VK_FALSE; + depthStencilInfo.stencilTestEnable = VK_FALSE; + depthStencilInfo.front = {}; + depthStencilInfo.back = {}; + depthStencilInfo.minDepthBounds = {}; + depthStencilInfo.maxDepthBounds = {}; VkPipelineColorBlendAttachmentState colorBlendAttachment; colorBlendAttachment.blendEnable = VK_FALSE; @@ -1052,7 +1064,7 @@ void CreateGraphicsPipeline() { pipelineInfo.pViewportState = &viewportState; pipelineInfo.pRasterizationState = &rasterizer; pipelineInfo.pMultisampleState = &multisampling; - pipelineInfo.pDepthStencilState = depthStencilInfo; + pipelineInfo.pDepthStencilState = &depthStencilInfo; pipelineInfo.pColorBlendState = &colorBlending; pipelineInfo.pDynamicState = &dynamicState; -- cgit v1.2.3