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

Author: Samuel Pitoiset <[email protected]>
Date:   Mon Jan 27 15:17:25 2020 +0100

radv: do not allow sparse resources with multi-planar formats

It's unsupported.

Fixes some fails or hangs with
dEQP-VK.sparse_resources.image_sparse_binding.*

Cc: 19.3 <[email protected]>
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Tested-by: Marge Bot 
<https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3581>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3581>

---

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

diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index b5d1fa31ba7..67a9cb7bfe0 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -1248,6 +1248,12 @@ static VkResult radv_get_image_format_properties(struct 
radv_physical_device *ph
                }
        }
 
+       /* Sparse resources with multi-planar formats are unsupported. */
+       if (info->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT) {
+               if (desc->plane_count > 1)
+                       goto unsupported;
+       }
+
        *pImageFormatProperties = (VkImageFormatProperties) {
                .maxExtent = maxExtent,
                .maxMipLevels = maxMipLevels,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to