radv: Use correct image view comparison for fast clears.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 18 Mar 2019 21:20:40 +0000 (22:20 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 18 Mar 2019 23:39:47 +0000 (00:39 +0100)
The if is actually returning true on success, enabling fast clears, so we
need to have the test succeed when the iview dimensions are right.

Fixes: d5400a5ec2a "radv: provide a helper for comparing an image extents."
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_meta_clear.c

index 1ead3a3f7cc7271d6f397867e9c20d25d5d7454c..4407bd75ee9a89580b8f0e8868c90568766d2e27 100644 (file)
@@ -651,7 +651,7 @@ static bool depth_view_can_fast_clear(struct radv_cmd_buffer *cmd_buffer,
            iview->base_mip == 0 &&
            iview->base_layer == 0 &&
            radv_layout_is_htile_compressed(iview->image, layout, queue_mask) &&
-           !radv_image_extent_compare(iview->image, &iview->extent))
+           radv_image_extent_compare(iview->image, &iview->extent))
                return true;
        return false;
 }