summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-10-06 08:43:05 -0400
committerJonathan Bradley <jcb@pikum.xyz>2023-10-06 08:43:05 -0400
commit7c15e824842ca4fd8c6279b805ba41f788693ebe (patch)
treecae2e44d54a38efb1f9ffc53c777bf8fc039b922 /src/window.cpp
parente12ba8979c54e45296ae748e5fb3e586ad4f0bdc (diff)
define VkPipelineDepthStencilStateCreateInfo for the present graphics pipeline
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp16
1 files 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;