OSDN Git Service

radv: do not allow sparse resources with multi-planar formats
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 27 Jan 2020 14:17:25 +0000 (15:17 +0100)
committerDylan Baker <dylan@pnwbakers.com>
Mon, 3 Feb 2020 16:31:30 +0000 (08:31 -0800)
It's unsupported.

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

Cc: 19.3 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3581>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3581>
(cherry picked from commit 83e1fa87a7e25b8e60f0817b09df8b54cfc38abd)

.pick_status.json
src/amd/vulkan/radv_formats.c

index 8b37014..a67055e 100644 (file)
         "description": "radv: do not allow sparse resources with multi-planar formats",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
index 0191787..6f6a759 100644 (file)
@@ -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,