Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
None
-
None
Description
Amend the `hellocube` example's `main.cpp`:
qputenv("QSG_RHI_BACKEND", "vulkan"); qputenv("QSG_RHI_DEBUG_LAYER", "1");
You'll see the following validation error when capturing a frame with renderdoc:
13 API High Miscellaneous 169239225 Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidRenderpass ] Object 0: handle = Device 10, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xa1662b9 | You cannot start a render pass using attachment 0 where the render pass initial layout is VK_IMAGE_LAYOUT_GENERAL and the previous known layout of the attachment is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. The layouts must match, or the render pass initial layout for the attachment must be VK_IMAGE_LAYOUT_UNDEFINED
I've seen this additional error in my own application, which looks related:
21 API High Miscellaneous 1303270965 Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0: handle = Baked Command Buffer 1887, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x4dae5635 | vkQueueSubmit2(): pSubmits[0].pCommandBufferInfos[0].commandBuffer command buffer VkCommandBuffer Baked Command Buffer 1887 expects VkImage 2D Color Attachment 215 (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, current layout is VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL.
This only happens when using `renderMode: View3D.Offscreen`. All other modes are fine.