KhronosGroup / Vulkan-LoaderAndValidationLayers

**Deprecated repository** for Vulkan loader and validation layers
Apache License 2.0
414 stars 172 forks source link

Image layout validation incorrect when recording command buffers out of submission order #2640

Closed fduranleau-gl closed 6 years ago

fduranleau-gl commented 6 years ago

Image layout transitions from render passes are checked at command recording time. However, if two render passes are recorded in different command buffers in parallel (in different threads; this is our use case), then image layout transition tracking in this manner is no longer valid, because recording order might not be the same as command buffer submission order. Actually, even in a single thread, but with two command buffers, the same reasoning still applies about recording and submission order.

That being said, image layout transitions from pipeline barriers are tracked correctly, because they are validated at submission time. So it seems like the fix would be to do the same for image layout transitions from render passes.

jzulauf-lunarg commented 6 years ago

@fduranleau-gl -- if you have a repro case it would help.

fduranleau-gl commented 6 years ago

Sorry for the delay to replay, I had to dig up in our codebase's history to try to find the exact case. But while doing so and digging into and experimenting more with validation layers and trying to understand better what they do, I just came to realize that what I report here is no issue at all. The problem is something else. So I must apologize for reporting this too eagerly. I am closing this issue now and I will open another one with a more appropriate description.

Sorry again for this noise.