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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d83314945d5f286cbe4fff9b07d2756f36a64c6;p=mesa.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 fc16aab7629..2fa0c359cc0 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);