Mesa (staging/18.2): radv: initialize the DCC predicate correctly when it's compressed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 17 11:35:44 UTC 2018


Module: Mesa
Branch: staging/18.2
Commit: 4477635b6939467727b8e9db19df9e502ad4b0ca
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4477635b6939467727b8e9db19df9e502ad4b0ca

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu Aug 16 12:33:13 2018 +0200

radv: initialize the DCC predicate correctly when it's compressed

We have to do a fast-clear eliminate when clearing DCC
metadata with 0x20202020. I don't know if that fixes anything
but that seems correct to me.

CC: 18.2 <mesa-stable at lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit f9e8456c39136aa41f85f82758a00e5aa2aab334)

---

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

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 84f7bb42c4..52c943f302 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -4127,15 +4127,18 @@ static void radv_init_color_image_metadata(struct radv_cmd_buffer *cmd_buffer,
 
 	if (radv_image_has_dcc(image)) {
 		uint32_t value = 0xffffffffu; /* Fully expanded mode. */
+		bool need_decompress_pass = false;
 
 		if (radv_layout_dcc_compressed(image, dst_layout,
 					       dst_queue_mask)) {
 			value = 0x20202020u;
+			need_decompress_pass = true;
 		}
 
 		radv_initialize_dcc(cmd_buffer, image, value);
 
-		radv_set_dcc_need_cmask_elim_pred(cmd_buffer, image, false);
+		radv_set_dcc_need_cmask_elim_pred(cmd_buffer, image,
+						  need_decompress_pass);
 	}
 
 	if (radv_image_has_cmask(image) || radv_image_has_dcc(image)) {




More information about the mesa-commit mailing list