Remove Textures from RenderPassNode::Storage

The lifetime of all textures bound to a RenderPass alongside syncing of textures is already handled by `CommandExecutor` and doesn't need to be redundantly handled by `RenderPassNode`. It's been removed as a result of this.
This commit is contained in:
PixelyIon 2021-12-08 14:07:05 +05:30
parent 45c7a89fc3
commit 34fc1e32b8
2 changed files with 1 additions and 19 deletions

View File

@ -14,11 +14,6 @@ namespace skyline::gpu::interconnect::node {
}
u32 RenderPassNode::AddAttachment(TextureView *view) {
auto &textures{storage->textures};
auto texture{std::find(textures.begin(), textures.end(), view->texture)};
if (texture == textures.end())
textures.push_back(view->texture);
auto vkView{view->GetView()};
auto attachment{std::find(attachments.begin(), attachments.end(), vkView)};
if (attachment == attachments.end()) {
@ -208,13 +203,6 @@ namespace skyline::gpu::interconnect::node {
preserveAttachmentIt++;
}
for (auto &texture : storage->textures) {
texture->lock();
texture->WaitOnBacking();
if (texture->cycle.lock() != cycle)
texture->WaitOnFence();
}
auto renderPass{(*gpu.vkDevice).createRenderPass(vk::RenderPassCreateInfo{
.attachmentCount = static_cast<u32>(attachmentDescriptions.size()),
.pAttachments = attachmentDescriptions.data(),
@ -243,12 +231,7 @@ namespace skyline::gpu::interconnect::node {
.pClearValues = clearValues.data(),
}, vk::SubpassContents::eInline);
cycle->AttachObjects(storage);
for (auto &texture : storage->textures) {
texture->unlock();
texture->cycle = cycle;
}
cycle->AttachObject(storage);
return renderPass;
}

View File

@ -35,7 +35,6 @@ namespace skyline::gpu::interconnect::node {
vk::raii::Device *device{};
vk::Framebuffer framebuffer{};
vk::RenderPass renderPass{};
std::vector<std::shared_ptr<Texture>> textures;
~Storage();
};