Module: Mesa Branch: master Commit: 0dedee7636e8fa64734dfb1c8f740b3665b52607 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0dedee7636e8fa64734dfb1c8f740b3665b52607
Author: Iago Toral Quiroga <[email protected]> Date: Wed Oct 28 09:58:35 2020 +0100 v3dv: update assertion to match VK_KHR_maintenance1 semantics Fixes crashes in: dEQP-VK.api.copy_and_blit.core.image_to_image.3d_images.* Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7364> --- src/broadcom/vulkan/v3dv_meta_copy.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_meta_copy.c b/src/broadcom/vulkan/v3dv_meta_copy.c index 72fb8926dc1..3b91589e26d 100644 --- a/src/broadcom/vulkan/v3dv_meta_copy.c +++ b/src/broadcom/vulkan/v3dv_meta_copy.c @@ -1295,12 +1295,16 @@ copy_image_tlb(struct v3dv_cmd_buffer *cmd_buffer, region->dstSubresource.aspectMask, &internal_type, &internal_bpp); - /* From the Vulkan spec, VkImageCopy valid usage: + /* From the Vulkan spec with VK_KHR_maintenance1, VkImageCopy valid usage: * - * "The layerCount member of srcSubresource and dstSubresource must match" + * "The number of slices of the extent (for 3D) or layers of the + * srcSubresource (for non-3D) must match the number of slices of the + * extent (for 3D) or layers of the dstSubresource (for non-3D)." */ - assert(region->srcSubresource.layerCount == - region->dstSubresource.layerCount); + assert((src->type != VK_IMAGE_TYPE_3D ? + region->srcSubresource.layerCount : region->extent.depth) == + (dst->type != VK_IMAGE_TYPE_3D ? + region->dstSubresource.layerCount : region->extent.depth)); uint32_t num_layers; if (dst->type != VK_IMAGE_TYPE_3D) num_layers = region->dstSubresource.layerCount; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
