Mesa (master): radv: skip fast-clear eliminate for CMASK based on a predicate

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 13 12:32:03 UTC 2021


Module: Mesa
Branch: master
Commit: fcd5925612e8efd15072b160743560a9a5ad4f86
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fcd5925612e8efd15072b160743560a9a5ad4f86

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Jan  5 15:53:29 2021 +0100

radv: skip fast-clear eliminate for CMASK based on a predicate

If we have CMASK, we can also skip FCE like we do for DCC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8332>

---

 src/amd/vulkan/radv_meta_fast_clear.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c
index 05be3da005b..8e5b1f89bfa 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -792,12 +792,14 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
 		}
 	}
 
-	if (radv_dcc_enabled(image, subresourceRange->baseMipLevel)) {
+	if (image->fce_pred_offset != 0) {
 		/* Clear the image's fast-clear eliminate predicate because
 		 * FMASK and DCC also imply a fast-clear eliminate.
 		 */
 		radv_update_fce_metadata(cmd_buffer, image, subresourceRange, false);
+	}
 
+	if (radv_dcc_enabled(image, subresourceRange->baseMipLevel)) {
 		/* Mark the image as being decompressed. */
 		if (decompress_dcc)
 			radv_update_dcc_metadata(cmd_buffer, image, subresourceRange, false);



More information about the mesa-commit mailing list