Mesa (master): radv: only use predication if the FCE value is allocated

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 13 11:21:19 UTC 2021


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Jan 12 14:16:16 2021 +0100

radv: only use predication if the FCE value is allocated

The FCE predicate value is only allocated if DCC is enabled.
We only want to use predication for DCC decompressions and for FCE
but not having FMASK doesn't mean the predicate is allocated.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4075
Fixes: 6e7008e94ba ("radv: do not predicate FMASK decompression when DCC+MSAA is used")
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/8441>

---

 src/amd/vulkan/radv_meta_fast_clear.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c
index 086749dbe55..05be3da005b 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -746,7 +746,7 @@ radv_emit_color_decompress(struct radv_cmd_buffer *cmd_buffer,
 	assert(cmd_buffer->queue_family_index == RADV_QUEUE_GENERAL);
 
 	if ((decompress_dcc && radv_dcc_enabled(image, subresourceRange->baseMipLevel)) ||
-	    (!(radv_image_has_fmask(image) && !image->tc_compatible_cmask))) {
+	    (!(radv_image_has_fmask(image) && !image->tc_compatible_cmask) && image->fce_pred_offset)) {
 		use_predication = true;
 	}
 



More information about the mesa-commit mailing list