Skip to content

zink: eliminate implicit feedback loops on rp begin

Mike Blumenkrantz requested to merge zmike/mesa:zink-feedback_elimination into main

in a scenario like:

  • bind fb
  • clear
  • bind fb attachment as sampler
  • begin rp
  • draw
  • end rp
  • flush
  • bind new fs
  • begin rp
  • draw

the first draw will have an implicit feedback loop, but the second one will not need a feedback loop. since no samplers or attachments are changed between draws, however, the feedback loop will remain active for successive renderpasses, which is problematic since the shader part of the driver (zink_update_barriers) attempts to eliminate these same feedback loops, leading to layout desync

instead, add handling to attachment prep here to eliminate feedback loops in the event that an attachment can be switched from a write layout to a read layout

fixes some layout desync in supertuxkart

Merge request reports