Vulkan-ValidationLayers icon indicating copy to clipboard operation
Vulkan-ValidationLayers copied to clipboard

BestPractices_ImageBarrierAccessLayout - VK_ACCESS_INPUT_ATTACHMENT_READ_BIT not being allowed for read-only layouts

Open vmilea opened this issue 1 year ago • 2 comments

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_OPTIMAL
  • VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
  • VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
  • VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
  • VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
  • VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
  • VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT
  • VK_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?

vmilea avatar Sep 10 '24 06:09 vmilea

Related issues: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2918, https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/6216.

vmilea avatar Sep 10 '24 07:09 vmilea

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

spencer-lunarg avatar Sep 10 '24 15:09 spencer-lunarg