radv: handle DCC image transitions before CMASK/FMASK transitions
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 13 Apr 2018 17:14:44 +0000 (19:14 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 16 Apr 2018 12:20:42 +0000 (14:20 +0200)
Mostly because DCC implies a fast-clear eliminate and we
should be able to skip some DCC decompressions by setting
a predicate like for CMASK and FMASK.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Niuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index f73526b5fc8b5099cf08c00e73f45eaa1e57aa3e..92c00f5394d1f0da714f199051299b36058b423a 100644 (file)
@@ -3854,15 +3854,15 @@ static void radv_handle_image_transition(struct radv_cmd_buffer *cmd_buffer,
                                                   dst_queue_mask, range,
                                                   pending_clears);
 
-       if (radv_image_has_cmask(image) || radv_image_has_fmask(image))
-               radv_handle_cmask_image_transition(cmd_buffer, image, src_layout,
-                                                  dst_layout, src_queue_mask,
-                                                  dst_queue_mask, range);
-
        if (radv_image_has_dcc(image))
                radv_handle_dcc_image_transition(cmd_buffer, image, src_layout,
                                                 dst_layout, src_queue_mask,
                                                 dst_queue_mask, range);
+
+       if (radv_image_has_cmask(image) || radv_image_has_fmask(image))
+               radv_handle_cmask_image_transition(cmd_buffer, image, src_layout,
+                                                  dst_layout, src_queue_mask,
+                                                  dst_queue_mask, range);
 }
 
 void radv_CmdPipelineBarrier(