From db582e5e7d1ad7c4baf01dee74252b449201f023 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 29 Mar 2023 16:42:02 -0400 Subject: [PATCH] zink: block resolves where src extents > dst extents vulkan resolves only provide "extents" instead of src and dst regions like GL, which means vk resolves can't be used to downscale images, as such operations will instead just crop the image fixes #8655 cc: mesa-stable Part-of: --- src/gallium/drivers/zink/zink_blit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c index 84e78036e4f..8f3e75f77d8 100644 --- a/src/gallium/drivers/zink/zink_blit.c +++ b/src/gallium/drivers/zink/zink_blit.c @@ -41,6 +41,11 @@ blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info, bool * info->src.box.depth < 0 || info->dst.box.depth < 0) return false; + /* vulkan resolves can't downscale */ + if (info->src.box.width > info->dst.box.width || + info->src.box.height > info->dst.box.height || + info->src.box.depth > info->dst.box.depth) + return false; if (info->render_condition_enable && ctx->render_condition_active)