Skip to content

video_core: Readbacks proof of concept #2668

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

raphaelthegreat
Copy link
Contributor

Readbacks are complex to get right, even more so to do that fast. At the moment they are implemented in relatively slowish way to test for correctness/data-validity. Before merging performance will be considered

raphaelthegreat and others added 4 commits March 23, 2025 01:03
Updates buffer cache memory tracker and page manager to read protect gpu modified pages. At the moment this is stubbed and doesn't do anything but it can be used to download gpu memory if guest attempts to read it
Downloading memory on every page fault is super slow but will suffice to test for now
Rewind allows guest to self modify its command list and synchronize properly. Oftentimes the value its polling is supposed to be written by a compute shader, thus it will never happen with nullgpu. Ignore the packet to avoid freezing in such case
@Randomuser8219
Copy link
Contributor

This fixes the vertex explosions in Lego games, but Lego Movie 2 softlocks on the loading screen when trying to go ingame. I'll attach a log soon

@lmutig
Copy link

lmutig commented Mar 23, 2025

This fixed the vertex explosion in the bloodborne. When changing hair style and beard, no more vertex explosion but flash once.
At the same time, the fps in the game is only about 20, which may require a lot of performance.

@Linear524
Copy link

Correct memory readback is more important right now than overall speed...
Emulation accuracy always comes first, and speed optimization will always be done later...
Thanks DEV's for making PS4 emulation closer to perfect ! :)
Hope to see Last Guardian an TLoU1 fully working this year :D

@rainmakerv3
Copy link
Contributor

For Bloodborne, as imutig commented, the vertex explosions do still occur but then immediately get corrected after, and performance is indeed greatly affected. I also noticed that the previous issues regarding issues with the dma data particles (3+ second freezing, rainbow light explosions which could also be a kind of vertex explosions) seem to be fixed as well by this (based on a 15 minute test in a problematic area)

@raphaelthegreat raphaelthegreat force-pushed the readbacks-poc branch 2 times, most recently from 248cb25 to c309e1d Compare March 23, 2025 13:10
@StevenMiller123
Copy link
Contributor

Fixes menu graphics in Uncharted 3 (I've loaded it through Uncharted: The Nathan Drake Collection, though based on what I've seen, this should affect the standalone version of the game too)
PR:
Screenshot from 2025-03-23 09-06-31
shad_log.txt
hub.com/user-attachments/assets/a31ff655-c206-418b-a396-7d8bb40b0294)

Main:
image
shad_log.txt

Fixes powerwashing in PowerWash Simulator
PR:
image
shad_log.txt

Main:
image
shad_log.txt

@StevenMiller123
Copy link
Contributor

Persona 5 Royal is significantly more unstable with this build, frequently crashing on access violations during menus and ingame. The crashes appear to be random, this log shows one that occurred after skipping the intro cutscene.
shad_log.txt

Here's a log from the current main build to compare:
P5R main.txt

@rafael-57
Copy link
Contributor

rafael-57 commented Mar 23, 2025

https://github.com/user-attachments/assets/00673fee-100e-4b98-8fd2-fd3456599ba4
https://github.com/user-attachments/assets/3d99f665-e948-4ad1-b6ec-4756ab5e6684

Most people have said that vertex explosions in Bloodborne now only last for a frame and get fixed afterwards, but that wasn't the case for me. They can also stay buggy for a long time unless you swap hair. Curiously, alt-tabbing can also fix them for some reason.

Performance is indeed highly impacted, excited for more performant variants of this :D

@brad0demx
Copy link

This PR fixes the vertex explosions in Lego Marvel Superheroes 2, however it causes the game to hang during the loading screen for upwards of 15 minutes before reaching ingame.
image

@RainKikyou
Copy link

Now many games cannot be boot, such as these
image
image
image

@rafael-57
Copy link
Contributor

rafael-57 commented Mar 25, 2025

Not sure if it was by chance but v. explosions seem kinda worse in BB:
https://github.com/user-attachments/assets/e3d98295-ebb0-4a28-8bad-c83abfeb10ea

For some reason now color is also misbehaving sometimes:
image

Performance is indeed slightly improved (went from 16-17 to 21-22fps in BB at 4k, without this PR I have 36)

Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request Apr 29, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request Apr 29, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request Apr 29, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request Apr 29, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request Apr 29, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request Apr 29, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 8, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 8, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 8, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 8, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 9, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 9, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 9, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 10, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 11, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 11, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 11, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 12, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 13, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 13, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 13, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 13, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 14, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 14, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 14, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 14, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 16, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 16, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 19, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 19, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 19, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 24, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 31, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request Jun 1, 2025
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.