radv: Use src format + dst type in copy_image for extent calculations
When copying multiple layers of a 2D image to a 3D image, the source image's format must be used, but the dest image's type.
The original RADV code for what is now vk_image_extent_to_elements
(meta_region_extent_el
and radv_sanitize_image_offset
) had an option
to set the DST image_type to be used which was used in copy_image in
radv_meta_copy.c for img_extent_el which got lost in the transition
to the common code.
See 20.2 in the Vulkan spec: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#copies-images
Fixes: c144030f ("vulkan,radv: Steal some image offset/extent helpers from radv")
Signed-off-by: Joshua Ashton joshua@froggi.es
Reported-by: shansheng wang shansheng.wang@amd.com
cc: @jekstrand @hakzsam
Supercedes: !20023 (closed)