mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxvk] Do not always keep an empty chunk around
Outdated thinking, we have a 20 second timer on this which should be more than enough to ensure we're not spamming device memory allocations.
This commit is contained in:
parent
3cd7e3efb5
commit
401ca41091
@ -531,11 +531,11 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
// Free chunks that have not been used in some time, but only free
|
||||
// one chunk at a time and keep at least one empty chunk alive.
|
||||
// one chunk per iteration. Reset the timer if we already freed one.
|
||||
if (!shouldFree && time != high_resolution_clock::time_point()) {
|
||||
if (chunk.unusedTime == high_resolution_clock::time_point() || chunkFreed)
|
||||
chunk.unusedTime = time;
|
||||
else if (unusedMemory > chunk.memory.size)
|
||||
else
|
||||
shouldFree = time - chunk.unusedTime >= std::chrono::seconds(20);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user