Mesa (master): zink: disallow depth-stencil blits with format-change

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 3 20:59:32 UTC 2020


Module: Mesa
Branch: master
Commit: 5d83314945d5f286cbe4fff9b07d2756f36a64c6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d83314945d5f286cbe4fff9b07d2756f36a64c6

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri Nov  1 13:35:55 2019 +0100

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 <airlied at redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3681>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3681>

---

 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);
 



More information about the mesa-commit mailing list