Skip to content

iris: Fix SURFACE_STATE addresses when replacing backing storage

Kenneth Graunke requested to merge kwg/mesa:iris-shadowbind into master

This series fixes #1365 (closed) (Unreal demos misrendering). Andrii Simiklit tracked down the root cause: when replacing backing storage for a resource, we failed the saved SURFACE_STATE of any non-bound sampler views which pointed at that resource. iris_rebind_buffer did that for currently bound ones, but we missed the case where a buffer was invalidated while unbound.

To make this work, we ultimately check if SURFACE_STATE needs updating on set_sampler_views. Previously, we uploaded SURFACE_STATE at create_sampler_view time, once for all time. Now, we create a CPU-side copy, as well as uploading a GPU copy. We can then modify the CPU copy and re-upload if addresses change.

Merge request reports