radv: enable DCC for mipmapped color textures on GFX8
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 20 Jun 2019 07:17:37 +0000 (09:17 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 20 Jun 2019 09:04:02 +0000 (11:04 +0200)
It's tricky on GFX9, so only GFX8 for now.

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

index 4bea09a8a2b8ca7b3005dfee5a0faa7e2b7f9e07..cf3f0eb1d55954b113fa81df24cb20618971428c 100644 (file)
@@ -170,8 +170,13 @@ radv_use_dcc_for_image(struct radv_device *device,
            vk_format_get_plane_count(pCreateInfo->format) > 1)
                return false;
 
-       /* TODO: Enable DCC for mipmaps and array layers. */
-       if (pCreateInfo->mipLevels > 1 || pCreateInfo->arrayLayers > 1)
+       /* TODO: Enable DCC for mipmaps on GFX9+. */
+       if (pCreateInfo->mipLevels > 1 &&
+           device->physical_device->rad_info.chip_class >= GFX9)
+               return false;
+
+       /* TODO: Enable DCC for array layers. */
+       if (pCreateInfo->arrayLayers > 1)
                return false;
 
        if (radv_surface_has_scanout(device, create_info))