Status update from kd-11 (17-07-2022)
Added 2022-07-17 21:53:29 +0000 UTCHi,It's kd-11 with another development update for RPCS3.
It's been a long time since my last update and a lot has been done. Let's go over some of the major highlights.
1. The MSAA rewrite was completed. MSAA filtering was redone with a better algorithm that provides a nice balance between visuals and performance. It's not perfect yet, and I will revisit the implementation later, but it works well enough and at higher resolutions the difference is not observable compared to hardware filtering.
2. Z-buffer quantization was added. Unfortunately RSX does not map 1:1 with modern PCs for some Z-buffer configurations, so we had to add discrete 'stops' to emulate the lower precision on the PS3 GPU. Fixes flickering due to depth-test rejections when using GL_EQUAL comparison on PS3 in games such as Crysis and Sega Rally.
3. Added improved value comparison on NVIDIA cards. On RSX, some values are considered equal when the difference between the 2 would be a subnormal number. Modern NVIDIA GPUs work a little differently, so we had to emulate float value comparisons to work the way they do on RSX. This fixed a lot of physics bugs in Naughty Dog titles such as floating grass, swimming walls and other geometry.
4. ZCULL unit was rewritten leading to massive speedups in certain titles. Some games enjoy upto 50% speedup on some setups after this set of improvements. The most consistent improvements were noticed in titles that use ZCULL timestamps with conditional rendering using the ZCULL occlusion reports. These 2 are stored side-by-side as a packed structure in RSX hardware and you cannot tell what the game is accessing at any one time, but with some clever use of page locks to sample usage patterns, we can separate the two allowing other optimizations to be used. Titles such as MGS4 benefit greatly from this feature.
5. Fixed some crashes that were triggered by MSAA.
6. Implemented support for aarch64 (64-bit arm) cpus. This allows games to run on native arm hardware with full GPU acceleration. Currently I've only been able to run simple games, but someone has been working to get the CPU side of things running smoothly and we're able to see results now. Arm performance is still nowhere near x86 but future hardware will help to close the gap.
7. Many other minor bug fixes and improvements, mostly targeting stability. Multiple crashes were fixed in several PRs.
8. This is the major one - OpenGL overhaul. The OpenGL backend had been abandoned somewhat for some time now, only receiving basic patches whenever we were making improvements to vulkan. I took some time to slowly update it to be more maintainable, reusing a lot of the structure found in the Vulkan backend for easier simultaneous development. This is a massive task and is still ongoing, but the benefits so far are looking good. Many games are playable now on OpenGL, albeit with a reduced framerate compared to Vulkan.
What's the current roadmap?
My current goal is to finish the OpenGL overhaul. This is almost done now, around 95% complete. I only need to add some optimizations around specific format uses and close off with a rewrite of the multithreaded shader compiler (it currently doesn't really work on OpenGL due to synchronization problems) and a port of the FSR upscaler. With that done, I'll move on to the next task which will be to tackle the upgrade to vulkan 1.3 before finally merging in the DMA tiling patches and read/write buffer unification. This is also a big task but is required for some future optimizations I want to introduce down the line.
Thank you all for your continued support,
Regards,
kd-11
Comments
Its always fun to read these status updates
Danu
2022-07-24 05:25:31 +0000 UTCnice work!
travelingsales
2022-07-21 12:10:21 +0000 UTCThanks for the update. I always enjoy reading these since they give a good high level overview of what changes have been included in recent updates. Thanks for all your amazing work.
polytoad
2022-07-18 03:19:18 +0000 UTC