mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 09:55:29 +03:00
Fix attachment reuse within the same subpass
Certain titles such as BOTW trigger behavior to reuse an attachment within the same subpass, this caused an exception inside `RenderPassNode::AddAttachment` as it cannot find corresponding subpass for attachment. To fix this issue, we now assume that when it cannot find a subpass for an existing attachment, it is attached to the latest subpass and return the attachment.
This commit is contained in:
parent
e027555796
commit
b307fca115
@ -71,8 +71,8 @@ namespace skyline::gpu::interconnect::node {
|
||||
}
|
||||
|
||||
if (it == subpassDescriptions.end())
|
||||
// We should never have a case where an attachment is bound to the render pass but not utilized by any subpass
|
||||
throw exception("Cannot find corresponding subpass for attachment #{}", attachmentIndex);
|
||||
// We assume an attachment is used by the latest subpass if it is not utilized by any past subpasses
|
||||
return attachmentIndex;
|
||||
|
||||
// We want to preserve the attachment for all subpasses till the current subpass
|
||||
auto lastUsageIt{it}; //!< The last subpass that the attachment has been used in for creating a dependency
|
||||
|
Loading…
Reference in New Issue
Block a user