radv: Emit a BATCH_BREAK when changing pixel shaders.

Bas Nieuwenhuizen requested to merge bnieuwenhuizen/mesa:radv-binning into master

Fixes a hang on Raven with Resident Evil 2.

I did not find anything more restricted to fix it:

  • Setting persistent_states_per_bin to 1 fixes it too, but likely does an internal break on any descriptor set changes too.
  • Only breaking the batch when cb_target_mask changes does not fix it (and looking at AMDVLK comments, I suspect the code in radeonsi should really be doing a FLUSH_DFSM).
  • Always doing a FLUSH_DFSM on shader switch helps, but that is more often than this and I don't think we should be doing that when DFSM is disabled.
  • Also emitting the existing break on framebuffer change when DFSM is disabled does not fix the issue.

Closes: #2315 (closed) CC: mesa-stable@lists.freedesktop.org

Merge request reports