BestPractices_ImageBarrierAccessLayout - VK_ACCESS_INPUT_ATTACHMENT_READ_BIT not being allowed for read-only layouts
The validation of access-layout combinations in image memory barriers is too restrictive. In addition to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, input attachment access should be allowed for the following layouts:
VK_IMAGE_LAYOUT_READ_ONLY_OPTIMALVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMALVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMALVK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMALVK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXTVK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR
Also, some recent layouts like VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL and VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL were never handled. Could we fix that as well?
Related issues: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2918, https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/6216.
Thanks for reporting this! you are right, this needs to be updated/fixed
unfortunately we are very backlogged and Best Practices is towards the bottom of the stack, so it might be awhile until we get to this