You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had this situation where we used an image in a render pass both as a depth attachment and as shader resource. The render pass set the image's layout to VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, but the same image was used in a descriptor with layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL. So obviously, we had image layout conflicts. However, commands for the render pass were recorded into secondary command buffers, and we had no errors being reported by core validation layer. As soon as we did not use secondary command buffers, we got the errors being reported.
There is no need record those secondary command buffes in parallel in other threads to get this error. Simply doing this sequence of commands will show the problem:
begin the render pass, with flag to use secondary command buffers
begin a secondary command buffer, with inheritance using render pass from 1.
issue a draw command using one of the render pass' attachments in a descriptor, but with a different layout
end command buffer
execute command buffer
end render pass
Doing the above, validation reports no errors. But doing this:
begin the render pass
issue a draw command using one of the render pass' attachments in a descriptor, but with a different layout
end render pass
triggers the expected error.
For the record, if it changes something to analyse this problem, the whole render pass in our use case is in its own primary command buffer. The rest is in other primary command buffers.
The text was updated successfully, but these errors were encountered:
Issue by fduranleau-gl (MIGRATED)
Tuesday May 08, 2018 at 13:32 GMT
Originally opened as KhronosGroup/Vulkan-LoaderAndValidationLayers#2653
We had this situation where we used an image in a render pass both as a depth attachment and as shader resource. The render pass set the image's layout to VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, but the same image was used in a descriptor with layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL. So obviously, we had image layout conflicts. However, commands for the render pass were recorded into secondary command buffers, and we had no errors being reported by core validation layer. As soon as we did not use secondary command buffers, we got the errors being reported.
There is no need record those secondary command buffes in parallel in other threads to get this error. Simply doing this sequence of commands will show the problem:
Doing the above, validation reports no errors. But doing this:
triggers the expected error.
For the record, if it changes something to analyse this problem, the whole render pass in our use case is in its own primary command buffer. The rest is in other primary command buffers.
The text was updated successfully, but these errors were encountered: