zink: add note about buffer<->image copy functions not handling multisample
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Sun, 14 Jun 2020 05:46:20 +0000 (01:46 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 31 Aug 2020 13:45:42 +0000 (13:45 +0000)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6266>

src/gallium/drivers/zink/zink_resource.c

index 3be32a95fdf3b299515bd9945d7216eefcf20a17..f093d7e9255b5adb20e287659c5518f611300f89 100644 (file)
@@ -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