[dxvk] Track lifetime of framebuffer attachments

We should mark images that are being used for rendering as
in-use by the GPU when binding the corresponding framebuffer.
This commit is contained in:
Philip Rebohle 2018-07-10 04:47:50 +02:00
parent 87b5161b2a
commit 67fe452580
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 7 additions and 0 deletions

View File

@ -1758,7 +1758,14 @@ namespace dxvk {
m_cmd->cmdBeginRenderPass(&info,
VK_SUBPASS_CONTENTS_INLINE);
m_cmd->trackResource(framebuffer);
for (uint32_t i = 0; i < framebuffer->numAttachments(); i++) {
m_cmd->trackResource(framebuffer->getAttachment(i).view);
m_cmd->trackResource(framebuffer->getAttachment(i).view->image());
}
m_cmd->addStatCtr(DxvkStatCounter::CmdRenderPassCount, 1);
}