anv, hasvk: allow using a 3D image as a resolve target
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

This is allowed by the specification, as the following VUIDs state:

   VUID-vkCmdResolveImage-srcImage-04446
   If dstImage is of type VK_IMAGE_TYPE_3D, then for each element of
   pRegions, srcSubresource.layerCount must be 1

   VUID-vkCmdResolveImage-srcImage-04447
   If dstImage is of type VK_IMAGE_TYPE_3D, then for each element of
   pRegions, dstSubresource.baseArrayLayer must be 0 and
   dstSubresource.layerCount must be 1

New tests coming for it: dEQP-VK.pipeline.*.multisample.3d.*

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36895>
This commit is contained in:
Iván Briano 2025-08-20 14:01:41 -07:00 committed by Marge Bot
parent 8b2642db84
commit 07057e270c
2 changed files with 6 additions and 2 deletions

View file

@ -2213,7 +2213,9 @@ anv_image_msaa_resolve(struct anv_cmd_buffer *cmd_buffer,
assert(src_image->vk.image_type == VK_IMAGE_TYPE_2D);
assert(src_image->vk.samples > 1);
assert(dst_image->vk.image_type == VK_IMAGE_TYPE_2D);
assert((dst_image->vk.image_type == VK_IMAGE_TYPE_2D) ||
(dst_image->vk.image_type == VK_IMAGE_TYPE_3D &&
dst_base_layer == 0 && layer_count == 1));
assert(dst_image->vk.samples == 1);
struct blorp_surf src_surf, dst_surf;

View file

@ -1314,7 +1314,9 @@ anv_image_msaa_resolve(struct anv_cmd_buffer *cmd_buffer,
assert(src_image->vk.image_type == VK_IMAGE_TYPE_2D);
assert(src_image->vk.samples > 1);
assert(dst_image->vk.image_type == VK_IMAGE_TYPE_2D);
assert((dst_image->vk.image_type == VK_IMAGE_TYPE_2D) ||
(dst_image->vk.image_type == VK_IMAGE_TYPE_3D &&
dst_base_layer == 0 && layer_count == 1));
assert(dst_image->vk.samples == 1);
struct blorp_surf src_surf, dst_surf;