Mesa (master): zink: add note about buffer<->image copy functions not handling multisample

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 31 13:54:05 UTC 2020


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Sun Jun 14 01:46:20 2020 -0400

zink: add note about buffer<->image copy functions not handling multisample

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

---

 src/gallium/drivers/zink/zink_resource.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 3be32a95fdf..f093d7e9255 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -408,6 +408,14 @@ zink_transfer_copy_bufimage(struct zink_context *ctx,
       int aspect = 1 << u_bit_scan(&aspects);
       copyRegion.imageSubresource.aspectMask = aspect;
 
+      /* this may or may not work with multisampled depth/stencil buffers depending on the driver implementation:
+       *
+       * srcImage must have a sample count equal to VK_SAMPLE_COUNT_1_BIT
+       * - vkCmdCopyImageToBuffer spec
+       *
+       * dstImage must have a sample count equal to VK_SAMPLE_COUNT_1_BIT
+       * - vkCmdCopyBufferToImage spec
+       */
       if (buf2img)
          vkCmdCopyBufferToImage(batch->cmdbuf, staging_res->buffer, res->image, res->layout, 1, &copyRegion);
       else



More information about the mesa-commit mailing list