anv: Initialize the clear color more often for FCV
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 23 Aug 2023 14:30:33 +0000 (10:30 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 1 Sep 2023 16:34:22 +0000 (16:34 +0000)
commit144c2d4e4a9f0dc492bfed6fc24bb22fb057a806
tree9ddbbe6d1c487ecac0b1510cbb13602fe0e9dac7
parent223d00fe0a91b19170fd28e8ba1bfdb611576bd4
anv: Initialize the clear color more often for FCV

Instead of only initializing the clear color when the first subresource
is accessed, initialize it for every FCV-enabled subresource. This is
needed because writes to any subresource may be converted to fast
clears.

Now that init_fast_clear_color is called for every subresource, we take
care not to stomp on the fast-clear-tracking state of the first
subresource by moving the code which updates it outside of
init_fast_clear_color.

Now init_fast_clear_color does just what it says: initializes the fast
clear color.

This fixes the regression introduced with commit 57445adc891,
("anv: Re-enable CCS_E on TGL+").

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8461
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24857>
src/intel/vulkan/genX_cmd_buffer.c