Fix pipeline creating the wrong render pass;

This commit is contained in:
bjorn 2022-06-04 01:31:16 -07:00
parent d9bf19da33
commit 2c2eada1f0
1 changed files with 4 additions and 4 deletions

View File

@ -1257,7 +1257,7 @@ bool gpu_pipeline_init_graphics(gpu_pipeline* pipeline, gpu_pipeline_info* info)
.samples = info->multisample.count,
.resolve = resolve,
.depth.format = convertFormat(info->depth.format, LINEAR),
.depth.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
.depth.layout = info->depth.format ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_UNDEFINED,
.depth.load = GPU_LOAD_OP_CLEAR,
.depth.save = GPU_SAVE_OP_DISCARD
};
@ -2445,9 +2445,9 @@ static VkRenderPass getCachedRenderPass(gpu_pass_info* pass, bool compatible) {
VkSubpassDescription subpass = {
.colorAttachmentCount = count,
.pColorAttachments = references + 0,
.pResolveAttachments = pass->resolve ? references + count : NULL,
.pDepthStencilAttachment = depth ? references + pass->count - 1 : NULL
.pColorAttachments = &references[0],
.pResolveAttachments = pass->resolve ? &references[count] : NULL,
.pDepthStencilAttachment = depth ? &references[pass->count - 1] : NULL
};
VkRenderPassMultiviewCreateInfo multiview = {