diff options
| author | CamilleLaVey <camillelavey@noreply.localhost> | 2025-06-30 12:57:21 +0000 |
|---|---|---|
| committer | CamilleLaVey <camillelavey@noreply.localhost> | 2025-06-30 12:57:21 +0000 |
| commit | fa600b88b180bc3de4009c1ee771f2cc1a481730 (patch) | |
| tree | cc28e8f666e0a10df1589b77da1e44bcbced9b0a /src/video_core/buffer_cache/buffer_cache.h | |
| parent | 09194cc5c306656eaafac81b3638fcfa700a090d (diff) | |
revert 91a662431cfe419bd46b6ca4ed298a4ba70d7820 (#240)
revert [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>
Had showed some regressions on devices with higher specifications, will be refined to return as a toggle in a later commit.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/240
Diffstat (limited to 'src/video_core/buffer_cache/buffer_cache.h')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index c7e287553e..af237703d5 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -50,7 +50,7 @@ BufferCache<P>::~BufferCache() = default; template <class P> void BufferCache<P>::RunGarbageCollector() { const bool aggressive_gc = total_used_memory >= critical_memory; - const u64 ticks_to_destroy = aggressive_gc ? 60 : 150; + const u64 ticks_to_destroy = aggressive_gc ? 60 : 120; int num_iterations = aggressive_gc ? 64 : 32; const auto clean_up = [this, &num_iterations](BufferId buffer_id) { if (num_iterations == 0) { @@ -1380,9 +1380,6 @@ void BufferCache<P>::JoinOverlap(BufferId new_buffer_id, BufferId overlap_id, }); new_buffer.MarkUsage(copies[0].dst_offset, copies[0].size); runtime.CopyBuffer(new_buffer, overlap, copies, true); -#ifdef ANDROID - runtime.Finish(); -#endif DeleteBuffer(overlap_id, true); } @@ -1674,12 +1671,7 @@ void BufferCache<P>::DeleteBuffer(BufferId buffer_id, bool do_not_mark) { } Unregister(buffer_id); - -#ifdef ANDROID - if (!do_not_mark) -#endif delayed_destruction_ring.Push(std::move(slot_buffers[buffer_id])); - slot_buffers.erase(buffer_id); if constexpr (HAS_PERSISTENT_UNIFORM_BUFFER_BINDINGS) { |
