v3dv: do not attempt to blit from a linear image source
The hardware only supports texturing from tiled images.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7247>
diff --git a/src/broadcom/vulkan/v3dv_meta_copy.c b/src/broadcom/vulkan/v3dv_meta_copy.c
index d8105bc..7c3bf36 100644
--- a/src/broadcom/vulkan/v3dv_meta_copy.c
+++ b/src/broadcom/vulkan/v3dv_meta_copy.c
@@ -3918,6 +3918,10 @@
assert(dst->tiling != VK_IMAGE_TILING_LINEAR ||
!vk_format_is_depth_or_stencil(dst_format));
+ /* Can't sample from linear images */
+ if (src->tiling == VK_IMAGE_TILING_LINEAR && src->type != VK_IMAGE_TYPE_1D)
+ return false;
+
VkImageBlit region = *_region;
/* Rewrite combined D/S blits to compatible color blits */
if (vk_format_is_depth_or_stencil(dst_format)) {