Drop size restruction bypass for frequently synced buffers

In cases where large buffers are updated every draw this could seriously increase memory usage beyond 3GB in the megabuffer.
This commit is contained in:
Billy Laws
2022-10-30 16:06:44 +00:00
parent 1088ed514c
commit 1d83dadefb
2 changed files with 4 additions and 2 deletions

View File

@ -354,8 +354,10 @@ namespace skyline::gpu {
return BufferBinding{unifiedMegaBuffer.buffer, unifiedMegaBuffer.offset + offset, size};
}
if (size > MegaBufferingDisableThreshold && sequenceNumber < FrequentlySyncedThresholdHigh)
if (size > MegaBufferingDisableThreshold) {
megaBufferViewAccumulatedSize += size;
return {};
}
size_t entryIdx{offset >> megaBufferTableShift};
size_t bufferEntryOffset{entryIdx << megaBufferTableShift};
@ -409,6 +411,7 @@ namespace skyline::gpu {
void Buffer::unlock() {
tag = ContextTag{};
AllowAllBackingWrites();
lastExecutionNumber = 0;
mutex.unlock();
}