Closed glebov-andrey closed 2 years ago
Thanks for the clear bug report, that commit fixes all three of the issues you reported. For future reference, there's no need from my side to create separate issues for individual bugs when they are very similar like this, but it's up to you.
Description
The RenderDoc application crashes while loading a capture containing a call to
vkBeginRenderPass()
for a secondary command buffer whenpBeginInfo->pInheritanceInfo->framebuffer
is imageless.The stack trace: (click to expand)
``` renderdoc.dll!VulkanRenderState::SetFramebuffer(WrappedVulkan * vk, ResourceId fb, const VkRenderPassAttachmentBeginInfo *) Line 1001 at c:\build\renderdoc\renderdoc\driver\vulkan\vk_state.cpp(1001) renderdoc.dll!WrappedVulkan::Serialise_vkBeginCommandBufferAs far as I can tell,
VulkanRenderState::SetFramebuffer
assumes that for imageless framebuffers the caller always provides a non-nullattachmentsInfo
. ButWrappedVulkan::Serialise_vkBeginCommandBuffer
doesn't do so and ends up defaulting toNULL
.Neither the documentation for
VkCommandBufferBeginInfo
nor the documentation forVkCommandBufferInheritanceInfo
appear to restrictframebuffer
to non-imageless framebuffers. The Validation Layers also don't complain about this.Since neither structure in question appears to have a way of passing
VkRenderPassAttachmentBeginInfo
(or an equivalent) in their chains, the best option is probably just to avoid fillingfbattachments
whenattachmentsInfo
isNULL
.Steps to reproduce
I can't provide a capture of the application, but this is the approximate code to reproduce:
Passing
nullptr
instead offramebuffer
inVkCommandBufferInheritanceInfo
when RenderDoc is loaded into the process works around the issue.Environment