Skip to content

Commit

Permalink
Fix validation error on render passes that do not clear the depth buf…
Browse files Browse the repository at this point in the history
…fer on load.
  • Loading branch information
kearwood committed Jan 13, 2024
1 parent eee56e4 commit 208533f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kraken/KRRenderPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void KRRenderPass::create(KRDevice& device, VkFormat swapChainImageFormat, VkFor
depthAttachment.storeOp = info.keepDepth ? VK_ATTACHMENT_STORE_OP_STORE : VK_ATTACHMENT_STORE_OP_DONT_CARE;
depthAttachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
depthAttachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
depthAttachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
depthAttachment.initialLayout = info.clearDepth ? VK_IMAGE_LAYOUT_UNDEFINED : VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
depthAttachment.finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;

VkAttachmentReference depthAttachmentRef{};
Expand Down

0 comments on commit 208533f

Please sign in to comment.