RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
15.22k stars 1.9k forks source link

PR 3664 Major slowdown regression #3675

Closed Xcedf closed 6 years ago

Xcedf commented 6 years ago

PR 3664 commit bf234dc6 caused major slowdown in most in many (if not all games) here's few examples RDR intro scene before 15fps after 5fps Juiced 2 first career race before 23 fps after 11 fps Heavy Rain Demo main menu before 30fps (about 37-40 if not limited) after 24-25 fps

kd-11 commented 6 years ago

That commit exclusively affects strict mode. Are you using strict mode?

Xcedf commented 6 years ago

Nope all test done with Strict Rendering off but i think it's Vulkan only issue, cause OGL has the same speed before and after and reverting changes in VKGSrender.cpp get issue fixed

kd-11 commented 6 years ago

In that case its not an issue. The previous implementation there was terrible and hacky. However, I'm not getting this massive slowdown you speak of and games are running at the same speed as before for me. I'll try and reproduce the issue.

TigiHof commented 6 years ago

I can confirm this major slowdown for Read Dead Redemption. For me it even goes down to 2ps with Vulkan (GeForce GTX 1070).

kd-11 commented 6 years ago

Any other games? RDR is the worst test candidate and I dont have the other 2.

P1llus commented 6 years ago

I can confirm that all my games (less busy ones, mostly lot's of jrpgs) still run perfectly smooth on 30 and 60fps :) No scaling, and using Vulkan only.

kd-11 commented 6 years ago

Try https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.3-1079 The issue with these games is that they have several dozen framebuffers per frame. Like 80+ That is a problem when scanning them several times per draw call x 2k+ calls. You end up scanning for hits something like 32000 times. This is not a bug per se, btw. We should scan for hits in framebuffer memory to determine proper scaling. That build optimizes the scanning method a bit to try and limit the impact of searching through such a long list. I'll eventually have to optimize the function or integrate the surface store into the texture cache somehow to ease the problem. The texture cache is alot more optimized for random searches. The only "solution" would be to hide this step behind strict mode, but I feel we're already hiding too much functionality behind that switch

Asinin3 commented 6 years ago

I tested around ~10 games and only found Juiced 2 to be regressed in terms of performance, the build kd linked above did fix the problem though. Here's results from Juiced 2 I just sat at the racing line then monitored performance after the other cars left the view.

Master: 13fps Fork: 19fps Before 3664: 23fps

TigiHof commented 6 years ago

This new build speeds up the beginning of Red Dead Redemption to around 6fps with Vulkan, so it is indeed an improvement.

kd-11 commented 6 years ago

The pipeline will be rewritten to eliminate this issue. I'll tackle this one with the next round of optimizations coming up in the next few days.

Xcedf commented 6 years ago

Indeed the games i've tested speeded up with this, thanks

Kravickas commented 6 years ago

Midnight club LA - from 12fps to 6fps 5820k 4,5Ghz

kd-11 commented 6 years ago

Retest with https://github.com/RPCS3/rpcs3/pull/3689 Or you can check by rsx_volatile branch which has a WIP rewrite of the rendering code

Xcedf commented 6 years ago

PR 3689 is fine, speed is back, but wip rsx_volatile rdr is slow as if there's no fix also characters has white faces and shadows even if they're buggy are gone, anyway it's another issue

Kravickas commented 6 years ago

12 fps back with 3689

Xcedf commented 6 years ago

fixed now by #3699