XaiJu
Nekotekina
Nekotekina

patreon


Status update from kd-11 (2020-08-23)

Hi,

It's kd-11 with another update on RSX emulation for the month of Aug 2020.

A lot of fixes have gone into RSX code in the past 4 weeks, here are the highlights:

1. Video memory management overhaul introduced to handle memory overload scenarios. When the GPU is almost out of memory, multiple techniques are used to free up as many resources as possible allowing users to enjoy higher resolution rendering without too much impact on VRAM. This fixes crashes in games that had runaway allocations where a lot of VRAM was being consumed by unnecessary texture data. [PR link.] 

2. Allowed CPU readback of swizzled textures to work correctly. This can happen in some games that use the rasterization pipeline to 'swizzle' texture data. Swizzled textures are rearranged to jumbled to maximize texture caching capabilities of hardware, but this feature is hidden from users in desktop GPUs requiring that we manually swizzle the textures when reading them from the GPU and unswizzle on the way back. This fixed glitching in some 2D visual novels. [PR link.] 

3. Fixed texture type mismatch on Vulkan which caused open source Intel drivers to refuse to run RPCS3. They were crashing when compiling shaders before even on the basic samples shipped with the emulator. [PR link.] 

4. Some code refactoring was done to unify how the render backends create textures for temporary data. This is needed for example when different tiles of a texture exist in different places e.g some may have been rendered as separate framebuffers and some stored on the CPU and we have to merge all of the pieces into one texture to read it on the GPU. This is common for things like reflection cubemaps where individual sides may be rendered as separate squares and then the game reads 6 of them in sequence as a large cubemap texture. We have to manually gather these pieces together and send them to the GPU as a temporary texture that only lives until it is not needed anymore. Fixed a pretty severe regression in some games like Baja Edge of Control [PR link.] 

5. Improved handling of formats with swapped red and blue channels, known as ABGR remap textures. Advancements in Vulkan drivers made it no longer a problem to use suitable PC desktop formats that map to these PS3 formats, making the implementation both cleaner and more accurate. This fixed some regressions in games like GTA4 and also fixed some older glitches in the engine (e.g GTA5 water with vulkan) [PR link.] 

Aside from that, I am currently undertaking two large tasks that require some time to complete. These include:

1. Depth storage mechanism is getting overhauled. Unfortunately, desktop PCs do not support the depth formats to match PS3 behavior, so a lot of trickery is done behind the scenes to emulate correct behavior. In the past, I just used fixed point depth buffers to emulate floating point operations but it turns out this solution is not enough. While debugging the causes of depth problems in several games, it was discovered that PS3 games do make full use of the floating point range, which means adding even more routines to handle depth storage emulation. The previous code relied on only being two modes, 16-bit and 24-bit fixed point depth, but adding floating point versions of these requires significant rewrites as the RSX implementation was only written with these two options in mind. A lot of code will need to get scrapped and written afresh, something I am working on behind the scenes. The initial proof-of-concept work can be found [here.] I am in the process of splitting the task into smaller chunks and setting up required code infrastructure over the next week or so to allow smooth transition.

2. RSX reservation behavior is getting rewritten. If you read the blog post on the Rpcs3 website [here] you may have seen a sneak peek at the improvements it brings to those without TSX-capable CPUs. This task is the highest priority once the depth fixes are completed and it is mostly done aleady. I will do a proper update on it once it is ready to release.

Once these two tasks are complete, I plan to transition into the feature implementation phase with improvements such as:

1. Finish shader interpreter integration. This feature is very useful in some games that take too long to compile shaders (e.g GoW Ascension) but it can be crashy on AMD and introduce long stalls on NVIDIA.

2. Finish 3D TV support. The basic work was already done, this shouldn't take me long to complete.

3. Overhaul texture cache to allow modern features such as persistent storage, VRAM budget management and modding support.

4. Blit engine optimizations.

These tasks will be followed by a round of cleanup and optimizations to tie it all together for the year.

Thank you all for your continued support.

Regards,

kd-11

Comments

Never posted on here before or setup RPCS3 (lol) yet but I keep supporting you guys on this Patreon for the last year+ because the active development keeps coming and you support Linux as well! :) I hope to finally get RPCS3 running over my holiday weekend on my Ubuntu 20.04 PC with: Ryzen 5 1600 , 16GB of ram, BUT a rather old GTX 770. Hope replace that soon with whenenever Big Navi comes out from AMD.

WayneJetSki

Thank you guys! I hope some day we would get to play every game flawlessly! Thank you all for letting me relive all my memories of these ps3 games on my PC

Michael Vega


More Creators