radv: allow TC-compat CMASK with storage images on GFX10+
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 2 Aug 2021 16:34:08 +0000 (18:34 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 19 Nov 2021 13:30:40 +0000 (13:30 +0000)
Hardware seems to support it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12173>

src/amd/vulkan/radv_image.c

index 9625639..55601f5 100644 (file)
@@ -378,7 +378,9 @@ radv_use_tc_compat_cmask_for_image(struct radv_device *device, struct radv_image
    if (device->instance->debug_flags & RADV_DEBUG_NO_TC_COMPAT_CMASK)
       return false;
 
-   if (image->usage & VK_IMAGE_USAGE_STORAGE_BIT)
+   /* TC-compat CMASK with storage images is supported on GFX10+. */
+   if ((image->usage & VK_IMAGE_USAGE_STORAGE_BIT) &&
+       device->physical_device->rad_info.chip_class < GFX10)
       return false;
 
    /* Do not enable TC-compatible if the image isn't readable by a shader