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)
This commit is contained in:
GamerzHell9137 2024-03-12 15:13:45 +01:00 committed by GitHub
parent 8354434a37
commit a4e85ce9d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<Texture> _textures;
private ulong _totalSize;