From a4e85ce9d12721b6a73af1c73fe5f22984d50005 Mon Sep 17 00:00:00 2001 From: GamerzHell9137 Date: Tue, 12 Mar 2024 15:13:45 +0100 Subject: [PATCH] Increase the limit of the total size of textures in the texture cache At the moment the size limit of textures that trigger the texture cache to delete them is set to 512 MB. With this change the size is changed to 1024 MB which makes games that previously worked before https://github.com/Ryujinx/Ryujinx/pull/4350 was merged, playable again. Mostly affects 4K mods of UE titles but it might potentially make resolution mods of other titles playable too (Xenoblade series) I don't take credit for this, this is mostly explained by GDK to me but I've tested couple of UE games and read comments from others/mod makers and they confirmed that this fixes slowdowns and crashes with mods that target higher resolutions than 1080p. Games that were tested and fixed are: Star Ocean 2 (fixes crash) Prince of Persia: The Lost Crown (fixes crash on the map) Demon Slayer (fixes performance) Baten Kaitos (fixes performance) Princess Pach: Showtime Demo (fixes performance) --- src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs b/src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs index 05782605b1..732ec5d4c8 100644 --- a/src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs +++ b/src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs @@ -46,7 +46,7 @@ namespace Ryujinx.Graphics.Gpu.Image { private const int MinCountForDeletion = 32; private const int MaxCapacity = 2048; - private const ulong MaxTextureSizeCapacity = 512 * 1024 * 1024; // MB; + private const ulong MaxTextureSizeCapacity = 1024 * 1024 * 1024; // MB; private readonly LinkedList _textures; private ulong _totalSize;