radv: handle CMASK/FMASK transitions only if DCC is disabled
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 13 Apr 2018 17:14:50 +0000 (19:14 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 16 Apr 2018 12:20:59 +0000 (14:20 +0200)
DCC implies a fast-clear eliminate, so I think this sounds
reasonable.

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

index afe953d..72fb6d6 100644 (file)
@@ -3841,9 +3841,7 @@ static void radv_handle_color_image_transition(struct radv_cmd_buffer *cmd_buffe
                           !radv_layout_can_fast_clear(image, dst_layout, dst_queue_mask)) {
                        radv_fast_clear_flush_image_inplace(cmd_buffer, image, range);
                }
-       }
-
-       if (radv_image_has_cmask(image) || radv_image_has_fmask(image)) {
+       } else if (radv_image_has_cmask(image) || radv_image_has_fmask(image)) {
                if (radv_layout_can_fast_clear(image, src_layout, src_queue_mask) &&
                    !radv_layout_can_fast_clear(image, dst_layout, dst_queue_mask)) {
                        radv_fast_clear_flush_image_inplace(cmd_buffer, image, range);