iris: Enable compression for image load/store in more cases
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 6 Oct 2022 17:19:20 +0000 (10:19 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Dec 2022 13:01:27 +0000 (13:01 +0000)
commit16a7e15d4fcfe205808bc19c133342de6645cf20
treec0331a24557eaf848e2dcf3c675783de3795b801
parentbf3d6ca94fa56eea8f989b0ca8c5cfe7fb8b7065
iris: Enable compression for image load/store in more cases

We were calling iris_resource_texture_aux_usage here, which disables
auxiliary support if color happens to already be resolved.  This makes
sense for read only images, where if we know ahead of time that aux
doesn't contain any useful information, we can just tell the hardware
to not bother looking at it.  However, it makes no sense for mutable
images, as even if the aux currently has no useful data, we want to
produce that data when doing our image writes.

Import the bits of logic we need from there and shed the rest.  We don't
need to consider HiZ, MCS, or MC, nor do we need to do format-based
CCS compatibility checks on Gfx12+, so it's actually very little code.

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