zink: block vkCmdBlitImage usage for multi sampled blits
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Sun, 14 Jun 2020 04:30:55 +0000 (00:30 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Jul 2020 12:57:22 +0000 (12:57 +0000)
this is prohibited by spec

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5888>

src/gallium/drivers/zink/zink_blit.c

index 6dd3caaece1bfffaeeef3f9c11b15519fc438764..2fdc7d582becba2bb6a48273b81ca92b91340754 100644 (file)
@@ -80,6 +80,10 @@ blit_native(struct zink_context *ctx, const struct pipe_blit_info *info)
        info->dst.format != info->src.format)
       return false;
 
+   /* vkCmdBlitImage must not be used for multisampled source or destination images. */
+   if (info->src.resource->nr_samples > 1 || info->dst.resource->nr_samples > 1)
+      return false;
+
    struct zink_resource *src = zink_resource(info->src.resource);
    struct zink_resource *dst = zink_resource(info->dst.resource);