mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 09:00:37 +02:00
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 <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7364>
This commit is contained in:
parent
e4988e6aff
commit
0dedee7636
1 changed files with 8 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue