mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-27 04:04:14 +01:00
Remove Texture
s 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:
parent
45c7a89fc3
commit
34fc1e32b8
@ -14,11 +14,6 @@ namespace skyline::gpu::interconnect::node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 RenderPassNode::AddAttachment(TextureView *view) {
|
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 vkView{view->GetView()};
|
||||||
auto attachment{std::find(attachments.begin(), attachments.end(), vkView)};
|
auto attachment{std::find(attachments.begin(), attachments.end(), vkView)};
|
||||||
if (attachment == attachments.end()) {
|
if (attachment == attachments.end()) {
|
||||||
@ -208,13 +203,6 @@ namespace skyline::gpu::interconnect::node {
|
|||||||
preserveAttachmentIt++;
|
preserveAttachmentIt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &texture : storage->textures) {
|
|
||||||
texture->lock();
|
|
||||||
texture->WaitOnBacking();
|
|
||||||
if (texture->cycle.lock() != cycle)
|
|
||||||
texture->WaitOnFence();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto renderPass{(*gpu.vkDevice).createRenderPass(vk::RenderPassCreateInfo{
|
auto renderPass{(*gpu.vkDevice).createRenderPass(vk::RenderPassCreateInfo{
|
||||||
.attachmentCount = static_cast<u32>(attachmentDescriptions.size()),
|
.attachmentCount = static_cast<u32>(attachmentDescriptions.size()),
|
||||||
.pAttachments = attachmentDescriptions.data(),
|
.pAttachments = attachmentDescriptions.data(),
|
||||||
@ -243,12 +231,7 @@ namespace skyline::gpu::interconnect::node {
|
|||||||
.pClearValues = clearValues.data(),
|
.pClearValues = clearValues.data(),
|
||||||
}, vk::SubpassContents::eInline);
|
}, vk::SubpassContents::eInline);
|
||||||
|
|
||||||
cycle->AttachObjects(storage);
|
cycle->AttachObject(storage);
|
||||||
|
|
||||||
for (auto &texture : storage->textures) {
|
|
||||||
texture->unlock();
|
|
||||||
texture->cycle = cycle;
|
|
||||||
}
|
|
||||||
|
|
||||||
return renderPass;
|
return renderPass;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,6 @@ namespace skyline::gpu::interconnect::node {
|
|||||||
vk::raii::Device *device{};
|
vk::raii::Device *device{};
|
||||||
vk::Framebuffer framebuffer{};
|
vk::Framebuffer framebuffer{};
|
||||||
vk::RenderPass renderPass{};
|
vk::RenderPass renderPass{};
|
||||||
std::vector<std::shared_ptr<Texture>> textures;
|
|
||||||
|
|
||||||
~Storage();
|
~Storage();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user