mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-21 13:37:23 +00:00
Use a linear allocator for most per-execution GPU allocations
Currently we heavily thrash the heap each draw, with malloc/free taking up about 10% of GPFIFOs execution time. Using a linear allocator for the main offenders of buffer usage callbacks and index/vertex state helps to reduce this to about 4%
This commit is contained in:
@ -152,8 +152,9 @@ namespace skyline::gpu {
|
||||
// Transfer all delegates references from the overlapping buffer to the new buffer
|
||||
for (auto &delegate : srcBuffer->delegates) {
|
||||
delegate->buffer = *newBuffer;
|
||||
if (delegate->usageCallback)
|
||||
delegate->usageCallback(*delegate->view, *newBuffer);
|
||||
if (delegate->usageCallbacks)
|
||||
for (auto &callback : *delegate->usageCallbacks)
|
||||
callback(*delegate->view, *newBuffer);
|
||||
}
|
||||
|
||||
newBuffer->delegates.splice(newBuffer->delegates.end(), srcBuffer->delegates);
|
||||
|
Reference in New Issue
Block a user