Compare commits

...

1 Commits

Author SHA1 Message Date
sayanss2
ec54671f2d issue 7277 - limit the GC call relative to expected_memory, removed unused variable 2022-01-06 12:48:01 +07:00
2 changed files with 1 additions and 4 deletions

View File

@@ -55,12 +55,10 @@ TextureCache<P>::TextureCache(Runtime& runtime_, VideoCore::RasterizerInterface&
const u64 possible_critical_memory = (device_memory * 7) / 10;
expected_memory = std::max(possible_expected_memory, DEFAULT_EXPECTED_MEMORY - 256_MiB);
critical_memory = std::max(possible_critical_memory, DEFAULT_CRITICAL_MEMORY - 512_MiB);
minimum_memory = 0;
} else {
// On OpenGL we can be more conservatives as the driver takes care.
expected_memory = DEFAULT_EXPECTED_MEMORY + 512_MiB;
critical_memory = DEFAULT_CRITICAL_MEMORY + 1_GiB;
minimum_memory = 0;
}
}
@@ -99,7 +97,7 @@ void TextureCache<P>::RunGarbageCollector() {
template <class P>
void TextureCache<P>::TickFrame() {
if (total_used_memory > minimum_memory) {
if (total_used_memory > expected_memory) {
RunGarbageCollector();
}
sentenced_images.Tick();

View File

@@ -370,7 +370,6 @@ private:
bool has_deleted_images = false;
bool is_rescaling = false;
u64 total_used_memory = 0;
u64 minimum_memory;
u64 expected_memory;
u64 critical_memory;