GPUOpen-Drivers/xgl

Incorrect assertion for `VkRenderPassAttachmentBeginInfo` with a non-imageless `VkFramebuffer`

glebov-andrey opened this issue · 1 comments

When running my application with a debug build of AMDVLK, I get an assertion here:

VK_ASSERT(pRenderPassAttachmentBeginInfo->attachmentCount == attachmentCount);

vkCmdBeginRenderPass is being called with a normal non-imageless VkFramebuffer, and the VkRenderPassBeginInfo chain contains a VkRenderPassAttachmentBeginInfo structure with its attachmentCount == 0.
This is explicitly permitted by the spec for non-imageless framebuffers here:

If framebuffer was created with a VkFramebufferCreateInfo::flags value that did not include VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT, and the pNext chain includes a VkRenderPassAttachmentBeginInfo structure, its attachmentCount must be zero.

It looks like the following call to SetImageViews(pRenderPassAttachmentBeginInfo) doesn't actually do anything when attachmentCount == 0, so this is probably just an incorrect assertion.

Fixed in 2023.Q1.1