diff options
| author | 2024-02-20 23:19:27 -0300 | |
|---|---|---|
| committer | 2024-02-20 23:19:27 -0300 | |
| commit | e0c17a21138ba4379a5c77b40a7d3fd7414ca605 (patch) | |
| tree | 798f8678677cabd7c9048ed06022997a804a1aa5 /src/video_core/texture_cache | |
| parent | Merge pull request #13091 from t895/device-renaming (diff) | |
| parent | texture_cache: tweak iteration tracking change (diff) | |
| download | yuzu-e0c17a21138ba4379a5c77b40a7d3fd7414ca605.tar.gz yuzu-e0c17a21138ba4379a5c77b40a7d3fd7414ca605.tar.xz yuzu-e0c17a21138ba4379a5c77b40a7d3fd7414ca605.zip | |
Merge pull request #10529 from liamwhite/critical-spacing
caches: make critical reclamation less eager and possible in more cases
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 01c3561c9..53b4876f2 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)); |
| @@ -1979,7 +1979,7 @@ void TextureCache<P>::RegisterImage(ImageId image_id) { | |||
| 1979 | if ((IsPixelFormatASTC(image.info.format) && | 1979 | if ((IsPixelFormatASTC(image.info.format) && |
| 1980 | True(image.flags & ImageFlagBits::AcceleratedUpload)) || | 1980 | True(image.flags & ImageFlagBits::AcceleratedUpload)) || |
| 1981 | True(image.flags & ImageFlagBits::Converted)) { | 1981 | True(image.flags & ImageFlagBits::Converted)) { |
| 1982 | tentative_size = EstimatedDecompressedSize(tentative_size, image.info.format); | 1982 | tentative_size = TranscodedAstcSize(tentative_size, image.info.format); |
| 1983 | } | 1983 | } |
| 1984 | total_used_memory += Common::AlignUp(tentative_size, 1024); | 1984 | total_used_memory += Common::AlignUp(tentative_size, 1024); |
| 1985 | image.lru_index = lru_cache.Insert(image_id, frame_tick); | 1985 | image.lru_index = lru_cache.Insert(image_id, frame_tick); |
| @@ -2149,7 +2149,7 @@ void TextureCache<P>::DeleteImage(ImageId image_id, bool immediate_delete) { | |||
| 2149 | if ((IsPixelFormatASTC(image.info.format) && | 2149 | if ((IsPixelFormatASTC(image.info.format) && |
| 2150 | True(image.flags & ImageFlagBits::AcceleratedUpload)) || | 2150 | True(image.flags & ImageFlagBits::AcceleratedUpload)) || |
| 2151 | True(image.flags & ImageFlagBits::Converted)) { | 2151 | True(image.flags & ImageFlagBits::Converted)) { |
| 2152 | tentative_size = EstimatedDecompressedSize(tentative_size, image.info.format); | 2152 | tentative_size = TranscodedAstcSize(tentative_size, image.info.format); |
| 2153 | } | 2153 | } |
| 2154 | total_used_memory -= Common::AlignUp(tentative_size, 1024); | 2154 | total_used_memory -= Common::AlignUp(tentative_size, 1024); |
| 2155 | const GPUVAddr gpu_addr = image.gpu_addr; | 2155 | const GPUVAddr gpu_addr = image.gpu_addr; |