iris: Allow fast clears on compressed image load/store access
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 6 Oct 2022 07:14:35 +0000 (00:14 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Dec 2022 13:01:27 +0000 (13:01 +0000)
commitbf3d6ca94fa56eea8f989b0ca8c5cfe7fb8b7065
tree71230623d3ffa2379df59fb112958c6d7e3fadfb
parent7b2a690a35409b9fb05b99be681600d6f3c79e90
iris: Allow fast clears on compressed image load/store access

While I haven't found documentation saying definitively that HDC
supports fast clear blocks, it seems to work just fine, even on
Tigerlake.  I have found several issues (atomics and HDC support
for linear compression) that both call out fast clears as an issue
in those corner cases, which suggests that fast clears do actually
work outside of those corners (which we already disable).

The previous commit implemented actual aux state updates for image
views.  With ISL_AUX_USAGE_GFX12_CCS_E, this means that we update
the aux state to COMPRESSED_CLEAR after writes.  But because we
weren't supporting fast clears, this meant that any such images
would need partial resolves to remove the clear color on next use.
Supporting fast clears allows us to drop all these resolves.

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_resolve.c