zink: reference blit/copy-region resources
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 26 Mar 2019 20:05:17 +0000 (21:05 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:44 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/zink_context.c

index 6da1bc6129628e2db97e6e6810e675b238169be0..c868e7c98d6bc9b967f065b10cda60d538e572e5 100644 (file)
@@ -1032,6 +1032,9 @@ zink_blit(struct pipe_context *pctx,
    if (!cmdbuf)
       return;
 
+   zink_cmdbuf_reference_resoure(cmdbuf, src);
+   zink_cmdbuf_reference_resoure(cmdbuf, dst);
+
    if (is_resolve) {
       VkImageResolve region = {};
 
@@ -1165,6 +1168,9 @@ zink_resource_copy_region(struct pipe_context *pctx,
       if (!cmdbuf)
          return;
 
+      zink_cmdbuf_reference_resoure(cmdbuf, src);
+      zink_cmdbuf_reference_resoure(cmdbuf, dst);
+
       vkCmdCopyImage(cmdbuf->cmdbuf, src->image, src->layout,
                      dst->image, dst->layout,
                      1, &region);