Skip to content
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

Ridge Racer hack: Flush after every prim if fb addr == tex addr. #6396

Merged
merged 1 commit into from
Jun 23, 2014

Conversation

hrydgard
Copy link
Owner

Fixes the bloom errors. @unknownbrackets discovered this method.

Not sure if I want to merge this.. It does add yet another check to a critical path.

@solarmystic, could you check the usual games? :)

Fixes #2919 .

Fixes the bloom errors. @unknownbrackets discovered this method.

Not sure if I want to merge this.. It does add yet another check
to a critical path.
@solarmystic
Copy link
Contributor

@hrydgard Will do, once the WC matches are over, heh (watching ALG vs KOR and looking forward to USA vs POR later.)

If the others (@sum2012 and @daniel229) beat me to it, so be it. They can test the exotic Chinese translated and patched games/visual novels I don't have.

@solarmystic
Copy link
Contributor

@hrydgard @unknownbrackets Heh, I made time anyway through the half time, results for your perusal:-

capture

Conclusion:-
Every game tested in the list is fine with the Ridge Racer hack. This should be good to go.

@solarmystic
Copy link
Contributor

@unknownbrackets
For the sake of transparency though, I have to mention that while testing the game which is resolved by the hack itself (Ridge Racer 2, not in the list), my system completely locked up again for a bit with a suspected graphics driver crash.

Took 15 seconds for me to force quit PPSSPP from the Task Manager after the lock up, and other videos that were playing in the background had to be restarted, for they had green screens (indicative of a graphics driver crash)

Hmm.. I thought the issue was resolved, but I guess not. Reminds me of the same thing that happened while testing out Mortal Kombat with that other pull request. (#6380)

@hrydgard
Copy link
Owner Author

Thanks for testing @solarmystic , but I was more worried about a speed impact than bugs, sorry I didn't make that more clear. Either way the impact should be very minor but I guess there could be some edge case.

This change will cause a lot more buffer copies to happen in Ridge Racer specifically, so it seems likely that those are contributing to the strange crashes you are seeing. At least a clue...

@solarmystic
Copy link
Contributor

@hrydgard What concerns me is that the scope of the crash causes a complete and global lockup.

I'm used to emulator specific crashes and errors (comes with the territory of being a beta tester for PPSSPP) but for it to completely take over my system like that is rather worrying.

Seems to be random too, still trying to find a repro method for it.

@solarmystic
Copy link
Contributor

Also, just for the record, I didn't notice any speed regressions severe enough to dip below 100% speed for any game in the list.

@unknownbrackets
Copy link
Collaborator

@solarmystic does applying this help at all?
unknownbrackets@ad060b9

-[Unknown]

@unknownbrackets
Copy link
Collaborator

This may impact Brave Story's performance on mobile. It draws (for bloom) a texture onto itself 18 times (2x 9 vertical slices) during the intro cutscene. I'm not sure if this style of bloom is used later in the game.

For me it reduces performance by 20%, which at least in this cutscene is actually not bad (still at ~1000% sometimes dipping to 800%.)

-[Unknown]

@hrydgard
Copy link
Owner Author

If that's the worst impact of this, I'm not too worried, but it does sort of hint that there may be other games that are affected worse. But maybe the best way to find them is to just merge and see what gets reported.

I guess those % numbers are from your PC? Could you check if Android drops harshly below 100% or something?

@unknownbrackets
Copy link
Collaborator

Well, I'm having trouble checking. It was working and then I tried the version with the code change, and it started displaying only white, so I undid it, and it's still only displaying white. No matter how I refresh things, restart Eclipse, etc.. it's displaying white now... grr...

I'm starting to wonder if I'm crazy and it never worked now.

When it was working (unless I am crazy after all and it never worked) it was already not going at full speed without this change.

-[Unknown]

@solarmystic
Copy link
Contributor

@unknownbrackets I'll have to do more indepth testing to be completely sure, but it seems like unknownbrackets@ad060b9 helps.

@solarmystic
Copy link
Contributor

@hrydgard @unknownbrackets Speed impact testing results, in case you're still interested. I pitted the latest master at the time(v0.9.8-1365-g1a830b1) combined with the hack (code entered manually since branch is not updated) vs the unaltered master.

capture

General Observations:-

  1. The 3rd Birthday exhibits a very minor performance regression with the hack.
  2. The rest of the games in the list are virtually unaffected performance wise. Some of them seem to actually benefit from the hack.

Conclusion:-

Once again, the hack seems to be non-detrimental to the vast majority of the games in test list. If merged, I wager that desktop users (or users with systems that are at least comparable to my decrepit test rig) will have nothing to complain about.

System used for testing:-

sysspec

Note:-
Throughout the testing, my system did not lock up even once this time around, thanks to unknownbrackets@ad060b9. I feel that it'd be good to add that to the master builds.

@solarmystic
Copy link
Contributor

One game that I forgot to add to the list, the game that the hack itself is supposed to fix (Ridge Racer 2) does undergo a significant performance regression in GPU limited situations, but we were already expecting that to happen:-

Before
rr2before

After
rr2after

It's the price to pay for correct graphical functionality, but the impact shouldn't be too bad at lower rendering resolutions.

The above screens were taken at 6x Rendering Resolution which is more than what the average mobile user will be using. and was set to that for demonstration purposes only.

@hrydgard
Copy link
Owner Author

Yeah, this causes a couple of extra buffer copies in Ridge Racer, but totally worth it to get good graphics (even though one of them might be avoidable with bounding box tracking, that would cause a lot more extra work for all other games than this change).

I'm gonna merge.

hrydgard added a commit that referenced this pull request Jun 23, 2014
Ridge Racer hack: Flush after every prim if fb addr == tex addr.
@hrydgard hrydgard merged commit e27e285 into master Jun 23, 2014
@hrydgard hrydgard deleted the ridge-racer-hack branch June 23, 2014 15:52
@unknownbrackets
Copy link
Collaborator

I wonder if this affected:
http://forums.ppsspp.org/showthread.php?tid=1192&pid=86976#pid86976

Although, not sure if 10fps or w/e was actually playable anyway if so.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image issues with Ridge Racer 1 and 2
3 participants