-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Textures : Increase the amount of VRAM Cache available for Textures based on selected DRAM. #36
Conversation
- If the device has less than 6GiB CPU Ram it'll default to : DefaultTextureSizeCapacity - for 8GiB CPU ram it'll cap to allowed 6GiB VRAM allocated - for 6GiB CPU ram it'll cap to allowed 4GiB VRAM allocated - for 12GiB CPU ram it'll cap to allowed 12GiB VRAM allocated
Testing this on my 3080 Ti with Super Mario Party: Jamboree, it works as expected for 6/8/12 GiB, but it's not using enough VRAM at 4 GiB. Making the following adjustments fixes it for me, and it also ensures that all devices with 0 memory capacity default to DefaultTextureSizeCapacity. In AutoDeleteCache.cs, add a constant for the following: private const ulong TextureSizeCapacity4GiB = 2 * GiB; Then use the following if/else statement: if (context.Capabilities.MaximumGpuMemory == 0)
{
_maxCacheMemoryUsage = DefaultTextureSizeCapacity;
return;
}
else if (cpuMemorySizeGiB < 6)
{
MaxTextureSizeCapacity = TextureSizeCapacity4GiB;
}
else if (cpuMemorySizeGiB == 6)
{
MaxTextureSizeCapacity = TextureSizeCapacity6GiB;
}
else if (cpuMemorySizeGiB == 8)
{
MaxTextureSizeCapacity = TextureSizeCapacity8GiB;
}
else
{
MaxTextureSizeCapacity = TextureSizeCapacity12GiB;
} |
Ryujinx_1.2.0+9b7ccd0_2024-10-26_14-03-57.log Testing on luigi mansions 3, no crashes |
As discussed in discord, this only affects 4K mods at 4GiB but that is already addressed under the 6GiB and 8GiB options, the reason 1024 is set for 4GiB is in order to allow lower end GPUs those with 4-6GiB of VRAM to be able to more freely upscale games and not run out of VRAM when doing so, this should fix upscaling issues with Luigi Mansion 3 on GPU's with lower than 12GiB of VRAM and others from the main and the OG Ryujinx project. In the future, perhaps allowing mods to change the VRAM and RAM setting would be ideal, that way you will be able to force 6GiB from the mod itself. |
Separate samplers are now supported and arrays in constant sets are bound
AutoCacheDelete Continuation of my previous Ryujinx commit from September on the Original Ryujinx Project.
What these changes aim to Improve :
Keep in mind these caps are still only the upper limit of what amount of VRAM can be allocated towards textures, as it'll always be capped to 50% of the GPU's Memory.
Side Notes: