Skip to content

vulkan: don't overwrite attachment layouts for self dependencies

If an implementation makes different compression choices for self-dependencies and attachment feeback loop, and the latter is less performant than the former, this leads to a negative perf impact.

Also the runtime is emitting inconsistent barriers with regard to layout transition and drivers end up seeing things like this on the same image within the same command buffer :

  • VK_IMAGE_LAYOUT_UNDEFINED -> VK_IMAGE_LAYOUT_GENERAL
  • VK_IMAGE_LAYOUT_GENERAL -> VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT
  • VK_IMAGE_LAYOUT_GENERAL -> VK_IMAGE_LAYOUT_GENERAL

Visible with this CTS for example : dEQP-VK.rasterization.rasterization_order_attachment_access.depth.samples_1.multi_draw_barriers

We're not bringing back the old internal VK_IMAGE_LAYOUT_SUBPASS_SELF_DEPENDENCY_MESA because it seems the only layout that it could replace was VK_IMAGE_LAYOUT_GENERAL. And both users of VK_IMAGE_LAYOUT_SUBPASS_SELF_DEPENDENCY_MESA (anv at the time now hasvk and dozen) considered it equivalent to VK_IMAGE_LAYOUT_GENERAL.

Signed-off-by: Lionel Landwerlin lionel.g.landwerlin@intel.com Fixes: 7077b72d ("vulkan,anv,dozen: Use VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT")

Merge request reports