mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-11-07 09:16:02 -10:00
liverpool: free the frames of nested indirect buffer tasks (#5258)
* liverpool: free the frames of nested indirect buffer tasks IndirectBuffer (graphics and compute) and IndirectBufferConst run their target as a nested coroutine and wait for it to finish, but the finished task stays suspended at final_suspend and its frame is never destroyed. Every indirect buffer leaked about 600 bytes of host heap. In inFAMOUS Second Son that is ~440 nested tasks per second, so committed memory grew by ~15 MB per minute (~0.9 GB per hour) without bound. With the frames destroyed it stays flat after warm-up. * liverpool: drop comments on nested task destroy
This commit is contained in:
1 parent
99e33b7e0a
commit
12c5978f6a
1 file changed
+3
@@ -205,6 +205,7 @@ Liverpool::Task Liverpool::ProcessCeUpdate(std::span<const u32> ccb) {
|
||||
YIELD_CE();
|
||||
RESUME_CE(task);
|
||||
}
|
||||
task.handle.destroy();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -801,6 +802,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
|
||||
YIELD_GFX();
|
||||
RESUME_GFX(task);
|
||||
}
|
||||
task.handle.destroy();
|
||||
break;
|
||||
}
|
||||
case PM4ItOpcode::IncrementDeCounter: {
|
||||
@@ -935,6 +937,7 @@ Liverpool::Task Liverpool::ProcessCompute(std::span<const u32> acb, u32 vqid) {
|
||||
YIELD_ASC(vqid);
|
||||
RESUME_ASC(task, vqid);
|
||||
}
|
||||
task.handle.destroy();
|
||||
break;
|
||||
}
|
||||
case PM4ItOpcode::DmaData: {
|
||||
|
||||
Reference in new issue
Block a user