radv: Disable multilayer & multilevel DCC.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 29 Aug 2017 22:58:03 +0000 (00:58 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 12 Sep 2017 20:06:24 +0000 (22:06 +0200)
The current DCC init routine doesn't account for initializing a
single layer or level. Multilayer seems hard for small textures on
pre-GFX9 as tre metadata for the layers can be interleaved. For
GFX9 multilevel textures are a problem for similar reasons.

So just disable this for now, until we handle the texture modes
correctly.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"

src/amd/vulkan/radv_image.c

index 9c57672..1488471 100644 (file)
@@ -120,6 +120,7 @@ radv_init_surface(struct radv_device *device,
                                   VK_IMAGE_USAGE_STORAGE_BIT)) ||
            (pCreateInfo->flags & VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT) ||
             (pCreateInfo->tiling == VK_IMAGE_TILING_LINEAR) ||
+            pCreateInfo->mipLevels > 1 || pCreateInfo->arrayLayers > 1 ||
             device->physical_device->rad_info.chip_class < VI ||
             create_info->scanout || (device->debug_flags & RADV_DEBUG_NO_DCC) ||
             !radv_is_colorbuffer_format_supported(pCreateInfo->format, &blendable))