radv: disable DCC for shareable images on GFX9+
authorAndres Rodriguez <andresx7@gmail.com>
Thu, 10 May 2018 03:40:21 +0000 (23:40 -0400)
committerAndres Rodriguez <andresx7@gmail.com>
Thu, 10 May 2018 15:27:12 +0000 (11:27 -0400)
This seems to be broken at the moment for opengl interop.

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_image.c

index 5cdffe1627f1106feb168d738655470609ca5d08..07618853049d90a0f2c8e2debfbb96497792f7d7 100644 (file)
@@ -110,6 +110,8 @@ radv_use_dcc_for_image(struct radv_device *device,
 {
        bool dcc_compatible_formats;
        bool blendable;
+       bool shareable = vk_find_struct_const(pCreateInfo->pNext,
+                                             EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR) != NULL;
 
        /* DCC (Delta Color Compression) is only available for GFX8+. */
        if (device->physical_device->rad_info.chip_class < VI)
@@ -118,6 +120,11 @@ radv_use_dcc_for_image(struct radv_device *device,
        if (device->instance->debug_flags & RADV_DEBUG_NO_DCC)
                return false;
 
+       /* FIXME: DCC is broken for shareable images starting with GFX9 */
+       if (device->physical_device->rad_info.chip_class >= GFX9 &&
+           shareable)
+               return false;
+
        /* TODO: Enable DCC for storage images. */
        if ((pCreateInfo->usage & VK_IMAGE_USAGE_STORAGE_BIT) ||
            (pCreateInfo->flags & VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR))