KhronosGroup / Vulkan-LoaderAndValidationLayers

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

Validate non-attachment uses of attachment image memory #2665

Open cdwfs opened 6 years ago

cdwfs commented 6 years ago

The spec states in section 7.3 Framebuffers:

Applications must ensure that all accesses to memory that backs image subresources used as attachments in a given renderpass instance either happen-before the load operations for those attachments, or happen-after the store operations for those attachments.

This requirement is not currently enforced by the validation layers, and the resulting bugs can be quite time consuming to track down.

A decent (but certainly non-exhaustive) start would be to add a check to ensure that none of the images bound as descriptors (and used by an active shader as defined in section 8.12) are also attachments for the current render pass.