Mesa (main): radv: allow TC-compat CMASK with storage images on GFX10+

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 19 13:51:25 UTC 2021


Module: Mesa
Branch: main
Commit: 2436cafffe49d3ff59d62f263164327b0c12a625
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2436cafffe49d3ff59d62f263164327b0c12a625

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon Aug  2 18:34:08 2021 +0200

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

Hardware seems to support it.

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

---

 src/amd/vulkan/radv_image.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 962563936f4..55601f5a604 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -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



More information about the mesa-commit mailing list