From 5d83314945d5f286cbe4fff9b07d2756f36a64c6 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 1 Nov 2019 13:35:55 +0100 Subject: [PATCH] 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: --- src/gallium/drivers/zink/zink_blit.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.30.2