Skip to content

iris: Fixes for rendering corruption caused by missing flushes when introducing/removing rendering feedback loops

Kenneth Graunke requested to merge kwg/mesa:mtl-corruption into main

This MR contains a number of fixes relating to rendering feedback loops, namely when the same image is simultaneously bound for reading as a texture and writing as a render target.

In particular:

  1. If an app binds new textures for only one stage (say VS) but leaves the FS and framebuffer in place, the new VS textures may or may not contain the same image as one of the render targets, introducing or removing rendering feedback loops. But we weren't re-evaluating it whether they exist in that case.
  2. If an app switches to a new shader but keeps using the existing set of bound textures, then the new shader might read fewer (or more) textures than the previous one. This may introduce or remove rendering feedback loops.
  3. We didn't really consider rendering feedback loops for images without CCS compression. While aux is a major source of headaches, we may still need to do flushes in order to properly order back to back draw calls so that draw 1's reads are fully done by the time draw 2 writes.

Seems to fix some rendering corruption @currojerez was seeing on his Meteorlake laptop.

+@currojerez +@nchery +@sushmave

Merge request reports