Module: Mesa Branch: staging/23.0 Commit: a09d1d6bfa52353c394ac501e0e2080ac6375cab URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a09d1d6bfa52353c394ac501e0e2080ac6375cab
Author: Mike Blumenkrantz <[email protected]> Date: Wed Mar 29 16:42:02 2023 -0400 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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22195> (cherry picked from commit db582e5e7d1ad7c4baf01dee74252b449201f023) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_blit.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 8515dedd473..113226ce72b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1264,7 +1264,7 @@ "description": "zink: block resolves where src extents > dst extents", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c index df718afc7fe..f9dccc590e4 100644 --- a/src/gallium/drivers/zink/zink_blit.c +++ b/src/gallium/drivers/zink/zink_blit.c @@ -40,6 +40,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)
