mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
Use a single default value for safe_tick.
This commit is contained in:
parent
9917f883c8
commit
1da998c0e2
1 changed files with 2 additions and 3 deletions
|
|
@ -133,11 +133,10 @@ void TextureCache<P>::RunGarbageCollector() {
|
|||
if (True(image.flags & ImageFlagBits::IsDecoding)) {
|
||||
return false;
|
||||
}
|
||||
const bool is_costly_load = True(image.flags & ImageFlagBits::CostlyLoad);
|
||||
const u64 safe_tick = 10;
|
||||
const bool is_recently_allocated = image.allocation_tick > frame_tick - safe_tick;
|
||||
const bool is_large_sparse = image.info.is_sparse && image.guest_size_bytes >= 256_MiB;
|
||||
const bool must_download = image.IsSafeDownload() && False(image.flags & ImageFlagBits::BadOverlap);
|
||||
const u64 safe_tick = is_costly_load || is_large_sparse ? 10 : 5;
|
||||
const bool is_recently_allocated = image.allocation_tick > frame_tick - safe_tick;
|
||||
if (must_download && !is_large_sparse) {
|
||||
auto map = runtime.DownloadStagingBuffer(image.unswizzled_size_bytes);
|
||||
const auto copies = FixSmallVectorADL(FullDownloadCopies(image.info));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue