issue 7277 - limit the GC call relative to expected_memory, removed unused variable

This commit is contained in:
sayanss2
2022-01-06 12:08:03 +07:00
parent acbfb0083a
commit 8a2d955997
2 changed files with 1 additions and 4 deletions
+1 -3
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();
@@ -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;