mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Only reallocate MegaBuffer
on usage
Certain submissions might not utilize megabuffering but reserve a `MegaBuffer` regardless, this is not optimal since it can inflate the allocations and waste memory. This commit addresses the issue by eliding the allocation given the current submission doesn't utilize them.
This commit is contained in:
@ -119,6 +119,14 @@ namespace skyline::gpu {
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool MegaBuffer::WasUsed() {
|
||||
return freeRegion != slot->backing.subspan(PAGE_SIZE);
|
||||
}
|
||||
|
||||
void MegaBuffer::ReplaceCycle(const std::shared_ptr<FenceCycle> &cycle) {
|
||||
slot->cycle = cycle;
|
||||
}
|
||||
|
||||
void MegaBuffer::Reset() {
|
||||
freeRegion = slot->backing.subspan(PAGE_SIZE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user