Mesa (master): radv: mark VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT as unsupported on GFX6-7

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 11 17:29:47 UTC 2021


Module: Mesa
Branch: master
Commit: d2524ed4a072430ca4acba50f00041d03d7039b1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d2524ed4a072430ca4acba50f00041d03d7039b1

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon Jan 11 16:00:47 2021 +0100

radv: mark VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT as unsupported on GFX6-7

This is only supported on GFX8+, this fixes a ton of CTS failures
on my Pitcairn (GFX6).

Fixes: af7fb4df50f ("radv: Add sparse image queries.")
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/8415>

---

 src/amd/vulkan/radv_formats.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index 79f9ea5b7f6..9ad2033a7b5 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -1284,6 +1284,10 @@ static VkResult radv_get_image_format_properties(struct radv_physical_device *ph
 	}
 
 	if (info->flags & VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT) {
+		/* Sparse textures are only supported on GFX8+. */
+		if (physical_device->rad_info.chip_class < GFX8)
+			goto unsupported;
+
 		if (desc->plane_count > 1 || info->type != VK_IMAGE_TYPE_2D ||
 		    info->tiling != VK_IMAGE_TILING_OPTIMAL ||
 		    vk_format_is_depth_or_stencil(format))



More information about the mesa-commit mailing list