iris: Update aux state tracking for image views after draws/dispatches
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 5 Oct 2022 06:34:56 +0000 (23:34 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Dec 2022 13:01:27 +0000 (13:01 +0000)
commit7b2a690a35409b9fb05b99be681600d6f3c79e90
treebe23f5d4c2307fe5b7e401f1bb8560de7295b808
parenta9652fe58853c16f5a70327bb3f788a90893f72b
iris: Update aux state tracking for image views after draws/dispatches

On Tigerlake and later, we enable compression for image views.  However,
we never actually added any code to update the aux state, which meant
that if it ever changed, things would break, badly.

We managed to avoid catastrophic effects in most cases because of
two other issues which papered over the problem: if compression wasn't
already enabled for an image, we'd leave it disabled.  And, we avoided
writing via the CPU to buffers with auxiliary.  So in most cases, CCS
remained disabled, or got enabled (say by glTexImage()) then stayed on
permanently.  There were still issues, but they managed to remain more
hidden than one would expect given the severity of the bug.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19060>
src/gallium/drivers/iris/iris_context.h
src/gallium/drivers/iris/iris_draw.c
src/gallium/drivers/iris/iris_resolve.c
src/gallium/drivers/iris/iris_state.c