From: Erik Faye-Lund Date: Fri, 1 Nov 2019 12:35:55 +0000 (+0100) Subject: zink: disallow depth-stencil blits with format-change X-Git-Tag: upstream/20.1.8~3736 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d83314945d5f286cbe4fff9b07d2756f36a64c6;p=platform%2Fupstream%2Fmesa.git zink: disallow depth-stencil blits with format-change The Vulkan spec says this about vkCmdBlitImage: "No format conversion is supported between depth/stencil images. The formats must match." So yeah, let's stop trying to do this. Reviewed-by: Dave Airlie Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c index fc16aab..2fa0c35 100644 --- a/src/gallium/drivers/zink/zink_blit.c +++ b/src/gallium/drivers/zink/zink_blit.c @@ -73,6 +73,10 @@ blit_native(struct zink_context *ctx, const struct pipe_blit_info *info) info->alpha_blend) return false; + if (util_format_is_depth_or_stencil(info->dst.format) && + info->dst.format != info->src.format) + return false; + struct zink_resource *src = zink_resource(info->src.resource); struct zink_resource *dst = zink_resource(info->dst.resource);