Status update from kd-11 (17-05-2021)
Added 2021-05-18 06:45:09 +0000 UTCHi,
It's kd-11 here with another progress update for RPCS3.
Since my last update, I have been focused on improving the state of the RPCS3 rendering pipelines. The main focus was to try and find solutions to some long-standing problems that have plagued the emulator for years. After recovering from my earlier illness, I got to work on solving difficult to diagnose bugs. There is a theme here - many fixes are related to the surface cache or texture subsystems. This is because there are multiple incomplete implementations in that area that can cause subtle but difficult to solve bugs. For example, enabling Read Color/Depth Buffers completely breaks rendering in some games instead of improving rendering across the board. Write Depth Buffer option also outright introduced glitches in many games or outright crashed. The end goal here is to have both 'Read' options merged into one option enabled by default, and both 'Write' options combined into one option to replace 'Write Color Buffers' option. The reason for this is to remove years of workarounds scattered all over the code to get around problems caused by trying to track these things separately.
Let's begin with a summary of what was done in the past month:
1. Fixed decompression of RG/RB textures. This was a regression, but it was unnoticed because this class of texture formats is not used in commercial games as far as I know. This fix restores the RSX texture sample application to accurate rendering matching real hardware on all formats.
2. Fixed a bug in shaders that caused flickering backgrounds in Hatsune Miku: Project Diva F caused by a division by zero in vertex shaders.
3. Fixed 'Write Depth Buffer' option causing memory corruption in some games such as Rachet & Clank: A Crack In Time.
4. Refactored render target management code to simplify future works.
5. Added renderdoc debugging mode option that adds human readable names to objects in renderdoc captures. This simplifies debugging on Vulkan which normally does not have readable names for objects and can mangle shaders quite a bit after compilation to SPIRV.
6. Added some general purpose fixes to the render target cache. This series of commits fixes logical issues identified while debugging memory corruption caused by enabling the seemingly harmless 'Read Color Buffers' option in Madden17.
7. Fixed a rare crash that can be triggered in some corner cases when MSAA is enabled. With this fix, it is possible to load Soundshapes past the menus now when using Vulkan.
8. RSX program management was rewritten. Some state data such as texture states is now stored separately to ensure persistence across shader swaps without doing a full texture lookup on the CPU. This optimization already existed but was broken and caused flickering geometry in some games such as Demon's Souls.
What I am currently working on:
1. 'Read Color Buffers' still causes some memory corruption. The severity is greatly reduced but can still be observed which indicates even more bugs lurking in the surface cache and texture cache code. I have a lot of experimental code in place that seems to solve this but more testing is required.
2. RSX<->CELL transactions to tiled memory blocks is incomplete. Currently this compression is bypassed entirely. I have some code in place but it fails some corner cases. I hope to have an update about this by the next update.
Once the two issues mentioned above are resolved, I would like to proceed with the merging of options and removal of unused workarounds resulting from this. A lot of research remains in this area to achieve full PS3 compatibility. Performance optimizations should then follow this task once everything is stable.
Thank you all for your continued support.
Regards,
kd-11
Comments
Good to have you back!!
Jorge
2021-05-18 08:28:20 +0000 UTCGlad to hear that you have recovered from your illness, I love reading your progress reports to see all the things you resolved and your plans for the future!
Derek Hyland
2021-05-18 08:26:14 +0000 UTC