-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect image layer validation with secondary command buffers #93
Comments
Comment by tobine (MIGRATED) @jzulauf-lunarg this replaces #2640 |
Comment by fduranleau-gl (MIGRATED) Indeed, I forgot to mention that. |
Comment by chrisforbes (MIGRATED) Even without the layout conflict, this seems likely to not be valid; see this bit of 7.3:
|
Comment by fduranleau-gl (MIGRATED) Right, I did miss that part of the spec. The situation comes from a sample using our engine that worked fine with GL and Metal. We hit this while porting to Vulkan (we would need to use an input attachment and multiple subpasses). That being said, the problem remains. I still expect to get an error to be reported when I use a secondary command buffer, whether that error is a conflict of layout or a non-attachment access during a render pass. |
@chrisforbes -- it looks like the image layout errors from the secondary buffers can only be resolved at queue submit time, while the image layout issue within the primary command buffer could be (likely are) reported a command record time. Does that match your understanding? |
@jzulauf-lunarg both primary and secondary cases should work pretty similarly for layout tracking -- either you have an existing requirement for the subresource layout and so validate against it, or you add a precondition to the CB. CmdExecuteCommands is where it gets interesting -- the secondary preconditions and layout updates have to be merged into the primary at that point. |
@fduranleau-gl -- Should be fixed by PR 148 |
PR merged in May. Cleaning up. |
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: