Revert "radv: Do not decompress on LAYOUT_GENERAL."
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 15 Aug 2019 23:06:55 +0000 (01:06 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 15 Aug 2019 23:22:35 +0000 (01:22 +0200)
Causes issues with a bunch of games with DXVK.

Fixes: 50add1b33ae "radv: Do not decompress on LAYOUT_GENERAL."
Acked-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_image.c

index b3a83ff306d12612b499157b9e51e46b2ea4b345..27843853af0f9cc8d0db35662d1e911a923c1d44 100644 (file)
@@ -1623,7 +1623,7 @@ bool radv_layout_has_htile(const struct radv_image *image,
                            unsigned queue_mask)
 {
        if (radv_image_is_tc_compat_htile(image))
-               return !in_render_loop;
+               return layout != VK_IMAGE_LAYOUT_GENERAL;
 
        return radv_image_has_htile(image) &&
               (layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL ||
@@ -1637,7 +1637,7 @@ bool radv_layout_is_htile_compressed(const struct radv_image *image,
                                      unsigned queue_mask)
 {
        if (radv_image_is_tc_compat_htile(image))
-               return !in_render_loop;
+               return layout != VK_IMAGE_LAYOUT_GENERAL;
 
        return radv_image_has_htile(image) &&
               (layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL ||
@@ -1665,7 +1665,7 @@ bool radv_layout_dcc_compressed(const struct radv_device *device,
            !radv_support_storage_dcc(device->physical_device))
                return false;
 
-       return radv_image_has_dcc(image) &&!in_render_loop;
+       return radv_image_has_dcc(image) && layout != VK_IMAGE_LAYOUT_GENERAL;
 }