summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h2
-rw-r--r--src/video_core/texture_cache/texture_cache.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 6d3d933c5..3818e00f4 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -35,7 +35,7 @@ BufferCache<P>::BufferCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, R
35 const s64 min_spacing_critical = device_local_memory - 512_MiB; 35 const s64 min_spacing_critical = device_local_memory - 512_MiB;
36 const s64 mem_threshold = std::min(device_local_memory, TARGET_THRESHOLD); 36 const s64 mem_threshold = std::min(device_local_memory, TARGET_THRESHOLD);
37 const s64 min_vacancy_expected = (6 * mem_threshold) / 10; 37 const s64 min_vacancy_expected = (6 * mem_threshold) / 10;
38 const s64 min_vacancy_critical = (3 * mem_threshold) / 10; 38 const s64 min_vacancy_critical = (2 * mem_threshold) / 10;
39 minimum_memory = static_cast<u64>( 39 minimum_memory = static_cast<u64>(
40 std::max(std::min(device_local_memory - min_vacancy_expected, min_spacing_expected), 40 std::max(std::min(device_local_memory - min_vacancy_expected, min_spacing_expected),
41 DEFAULT_EXPECTED_MEMORY)); 41 DEFAULT_EXPECTED_MEMORY));
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index a20c956ff..3faff0c2f 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -55,7 +55,7 @@ TextureCache<P>::TextureCache(Runtime& runtime_, Tegra::MaxwellDeviceMemoryManag
55 const s64 min_spacing_critical = device_local_memory - 512_MiB; 55 const s64 min_spacing_critical = device_local_memory - 512_MiB;
56 const s64 mem_threshold = std::min(device_local_memory, TARGET_THRESHOLD); 56 const s64 mem_threshold = std::min(device_local_memory, TARGET_THRESHOLD);
57 const s64 min_vacancy_expected = (6 * mem_threshold) / 10; 57 const s64 min_vacancy_expected = (6 * mem_threshold) / 10;
58 const s64 min_vacancy_critical = (3 * mem_threshold) / 10; 58 const s64 min_vacancy_critical = (2 * mem_threshold) / 10;
59 expected_memory = static_cast<u64>( 59 expected_memory = static_cast<u64>(
60 std::max(std::min(device_local_memory - min_vacancy_expected, min_spacing_expected), 60 std::max(std::min(device_local_memory - min_vacancy_expected, min_spacing_expected),
61 DEFAULT_EXPECTED_MEMORY)); 61 DEFAULT_EXPECTED_MEMORY));
@@ -81,7 +81,6 @@ void TextureCache<P>::RunGarbageCollector() {
81 if (num_iterations == 0) { 81 if (num_iterations == 0) {
82 return true; 82 return true;
83 } 83 }
84 --num_iterations;
85 auto& image = slot_images[image_id]; 84 auto& image = slot_images[image_id];
86 if (True(image.flags & ImageFlagBits::IsDecoding)) { 85 if (True(image.flags & ImageFlagBits::IsDecoding)) {
87 // This image is still being decoded, deleting it will invalidate the slot 86 // This image is still being decoded, deleting it will invalidate the slot
@@ -96,6 +95,7 @@ void TextureCache<P>::RunGarbageCollector() {
96 if (!high_priority_mode && must_download) { 95 if (!high_priority_mode && must_download) {
97 return false; 96 return false;
98 } 97 }
98 --num_iterations;
99 if (must_download) { 99 if (must_download) {
100 auto map = runtime.DownloadStagingBuffer(image.unswizzled_size_bytes); 100 auto map = runtime.DownloadStagingBuffer(image.unswizzled_size_bytes);
101 const auto copies = FullDownloadCopies(image.info); 101 const auto copies = FullDownloadCopies(image.info);