zink: fall back to util_blitter for scaled resolves
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 24 Nov 2020 10:21:07 +0000 (11:21 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 24 Nov 2020 14:47:47 +0000 (14:47 +0000)
Vulkan can't scale while resolving using vkCmdResolveImage. For this we
need to use util_blitter.

The reason this wasn't a problem in the past, was that glBlitFramebuffer
always set pipe_blit_info::render_condition_enable, and we always used
that to bail out to util_blitter. When the latter changed, this broke.

Fixes: 19906022e22 ("zink: more accurately track supported blits")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7745>

src/gallium/drivers/zink/zink_blit.c

index 99d344e..45d9b0e 100644 (file)
@@ -17,6 +17,11 @@ blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info)
        info->alpha_blend)
       return false;
 
+   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)
       return false;