XaiJu
Nekotekina
Nekotekina

patreon


Status update from kd-11 (16-07-2021)

Hi,

It's kd-11 with a progress update on RSX emulation for the RPCS3 emulator.

It's been a while since the last update, and a lot has happened since then. Let us begin with a summary of the improvements made since the last update:

I'd like to take a moment to highlight the two major tasks in the list that are worth discussing:

Video memory manager rewrite

At a glance this may not seem very important and that was the general sentiment. Afterall, in most games a 4GB GPU from 2016 can handle 1440p in RPCS3 without issues. However, we encountered two main problems. First, some games will have burst memory consumption. This happens during level transitions or background streaming situations. RPCS3 defers all operations when using Vulkan and therefore has to keep records of all the data until it has been fully worked on by the host GPU. This means it is possible to easily exhaust the 4GB of available memory if the right conditions were met. With some user testing, we were able to show that we could, in the worst case, fill up even a RTX 3090 GPU with its 24GB of VRAM. This of course is highly inefficient. There is also an influx of low-power gaming handhelds these days that only have 512MB of dedicated memory for the iGPU. This meant that we needed to improve the algorithms to have a 'working set' and 'non-working set'. We only need to keep the working set in the GPU-visible memory, we can keep the rest of it in system memory. I also added many routines to remove as much unnecessary information from the non-working set to avoid putting too much pressure on the system. With these changes, it is possible to run RPCS3 with decent memory utilization. We also did not take advantage of multiple heaps that provide the same type of access. e.g in AMD and NVIDIA GPUs, there is a special 256MB BAR region. We can take advantage of this special memory now, while before it was invisible to us. This meant that for example a iGPU with 512MB of reported dedicated VRAM in the BIOS would only show 256MB in RPCS3 which is not enough for PS3 emulation without issues. Now all compatible memory types are pooled together, exposing more usable memory to the games.

FSR integration

This one was in discussion for a while since the initial binary-only release of FSR in June. Unfortunately, it took a while for the source to be released. FSR in RPCS3 works by closing the gap between your rendering resolution and your game window output resolution. The difference compared to 'dumb' bilinear upscaling is huge in some titles, and especially with MSAA enabled to clean up edges it does work fairly well. The initial integration was mostly done for proof of concept, to just confirm that it works as well as we hoped it would. Optimizations and tuning will follow as we get our hands on more devices to test the code on.

I have some more experiments right now that I'm still investigating for now. The primary focus still remains bugfixes to improve the user experience, such as eliminating crashes or distracting visual glitches. Unfortunately, newer drivers from both AMD and NVIDIA have thrown a wrench into the works somewhat. It's really not anyone's fault, requirements are just very different between emulators and games and doing things in an efficient manner means that sometimes we are forced to devise clever shortcuts. I hope to have more information by the next update.

Thank you all for your continued support.

Regards,

kd-11

Comments

hello

Spencer Robinson

Seconded, this project has come a long way! Thanks for the write up!

Jason Guffey

Thanks! That was an interesting read, especially the two highlights.

Covox


More Creators