Garbage Collection: Final tuning.

This commit is contained in:
Fernando Sahmkow
2022-01-16 06:34:43 +01:00
parent 5e982a7812
commit 9edbbf2af4
6 changed files with 36 additions and 24 deletions

View File

@ -464,9 +464,9 @@ BufferCache<P>::BufferCache(VideoCore::RasterizerInterface& rasterizer_,
const s64 device_memory = static_cast<s64>(runtime.GetDeviceLocalMemory());
const s64 min_spacing_expected = device_memory - 1_GiB - 512_MiB;
const s64 min_spacing_critical = device_memory - 1_GiB;
const s64 mem_tresshold = std::min(device_memory, TARGET_THRESHOLD);
const s64 min_vacancy_expected = (6 * mem_tresshold) / 10;
const s64 min_vacancy_critical = (3 * mem_tresshold) / 10;
const s64 mem_threshold = std::min(device_memory, TARGET_THRESHOLD);
const s64 min_vacancy_expected = (6 * mem_threshold) / 10;
const s64 min_vacancy_critical = (3 * mem_threshold) / 10;
minimum_memory = static_cast<u64>(
std::max(std::min(device_memory - min_vacancy_expected, min_spacing_expected),
DEFAULT_EXPECTED_MEMORY));