radv: allow TC-compat CMASK with storage images on GFX10+

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>
This commit is contained in:
Samuel Pitoiset 2021-08-02 18:34:08 +02:00 committed by Marge Bot
parent 22d9d0f8b5
commit 2436cafffe
1 changed files with 3 additions and 1 deletions

View 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