diff options
| author | JPikachu <jpikachu.eden@gmail.com> | 2025-06-29 17:14:23 +0000 |
|---|---|---|
| committer | JPikachu <jpikachu@noreply.localhost> | 2025-06-29 17:14:23 +0000 |
| commit | 91a662431cfe419bd46b6ca4ed298a4ba70d7820 (patch) | |
| tree | 686cf38ab4c6d697e336be4684626707284afca2 /src/video_core/texture_cache/texture_cache.h | |
| parent | b5b1d20e1e0756066abf0457bd66695dde40bab7 (diff) | |
[Texture_cache] Better memory handling for devices with lower memory allocations (#233)
Means games like Minecraft Dungeons, Sea of Stars, Luigi Mansion 2, Astroneer, Alan Wake, etc are now playable.
It also cleans up the recent abi.cpp and bindless texture commits a bit.
Everything is in #ifdef ANDROID - The biggest change is CACHING_PAGEBITS = 12.
Without that the way the buffercache grows and joins buffers can cause Android to run out of memory (as you end up with just one big buffer that needs to be copied every time it grows)
Also patches up ffmpeg issues.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/233
Co-authored-by: JPikachu <jpikachu.eden@gmail.com>
Co-committed-by: JPikachu <jpikachu.eden@gmail.com>
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index feb1c575eb..3178866128 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -78,6 +78,9 @@ void TextureCache<P>::RunGarbageCollector() { size_t num_iterations = 0; const auto Configure = [&](bool allow_aggressive) { +#ifdef ANDROID + high_priority_mode = true; +#endif high_priority_mode = total_used_memory >= expected_memory; aggressive_mode = allow_aggressive && total_used_memory >= critical_memory; ticks_to_destroy = aggressive_mode ? 10ULL : high_priority_mode ? 25ULL : 50ULL; |
