zink: track used resources
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 12 Jun 2019 15:43:03 +0000 (17:43 +0200)
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_resource.c

index 7f5993cc4c25efb2bd2fb9517763fb24bac6f9df..24dc051513de399d2c0a1f74156e796eb26273e6 100644 (file)
@@ -368,6 +368,9 @@ zink_transfer_copy_bufimage(struct zink_context *ctx,
    copyRegion.imageExtent.width = trans->base.box.width;
    copyRegion.imageExtent.height = trans->base.box.height;
 
+   zink_cmdbuf_reference_resoure(cmdbuf, res);
+   zink_cmdbuf_reference_resoure(cmdbuf, staging_res);
+
    if (buf2img)
       vkCmdCopyBufferToImage(cmdbuf->cmdbuf, staging_res->buffer, res->image, res->layout, 1, &copyRegion);
    else