radv: Do not decompress on LAYOUT_GENERAL.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 4 Aug 2019 23:24:45 +0000 (01:24 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 7 Aug 2019 00:13:07 +0000 (02:13 +0200)
We handle render loops properly now and STORAGE still disables
DCC/TC-compat HTILE in general.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_image.c

index 821075464211522388ee6e67313d23fad17b6a33..0c34e2961548263d598aa0370afb198f9a5980f3 100644 (file)
@@ -1601,7 +1601,7 @@ bool radv_layout_has_htile(const struct radv_image *image,
                            unsigned queue_mask)
 {
        if (radv_image_is_tc_compat_htile(image))
-               return layout != VK_IMAGE_LAYOUT_GENERAL;
+               return !in_render_loop;
 
        return radv_image_has_htile(image) &&
               (layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL ||
@@ -1615,7 +1615,7 @@ bool radv_layout_is_htile_compressed(const struct radv_image *image,
                                      unsigned queue_mask)
 {
        if (radv_image_is_tc_compat_htile(image))
-               return layout != VK_IMAGE_LAYOUT_GENERAL;
+               return !in_render_loop;
 
        return radv_image_has_htile(image) &&
               (layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL ||
@@ -1641,7 +1641,7 @@ bool radv_layout_dcc_compressed(const struct radv_image *image,
            (queue_mask & (1u << RADV_QUEUE_COMPUTE)))
                return false;
 
-       return radv_image_has_dcc(image) && layout != VK_IMAGE_LAYOUT_GENERAL;
+       return radv_image_has_dcc(image) &&!in_render_loop;
 }