RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.45k stars 1.92k forks source link

Regressions caused by zcull implementation (#3135) #3165

Closed kd-11 closed 7 years ago

kd-11 commented 7 years ago

This ticket is here to track any regressions introduced by https://github.com/RPCS3/rpcs3/pull/3135

isshininu commented 7 years ago

Well, this is new:

RPCS3.ZIP fps_ 21 39 _ opengl _ demon s souls _ bles00932 06 08 2017 16_48_20 fps_ 21 39 _ opengl _ demon s souls _ bles00932 06 08 2017 16_48_52

Xcedf commented 7 years ago

After this PR games have a hell of a slowdown before to render ingame graphics, like something being cached, when it stops fps going back to normal, but the games like Condemned 2 caching smth every second and slowdowns don't stop, what could it be?

Xcedf commented 7 years ago

Another regression in game Saw II, some parts of the game are blacked out 27 found the commit to cause this https://github.com/kd-11/rpcs3/commit/7411bc27ba0486834249fafc14bc72677699e519

kd-11 commented 7 years ago

The vertex rewrite builds have hitching due to increased time used to generate graphics pipelines. If the issue is actually present in naster that would be great actually since it makes deployment much easier once fixed. As for missing graphics in some games, it seems they arent drawing occluders - will need to research why. As for DeS, the game does misbehave on occasion. Rebooting usually solves the issue.

kd-11 commented 7 years ago

Actually after looking at the commit you identified, looks like a trivial fix for saw which is a relief. Any other games misbehaving this way? Also, if you can, test for the stuttering issue. This PR shouldnt have affected things that much, but it is possible that locks in the texture cache are somehow causing this.

Xcedf commented 7 years ago

@kd-11 look's like stuttering is actually in the master now searching the commit which is after this, will give info is a few minutes

money123451 commented 7 years ago

Pre Zcull merge in RDR opengl and post Zcull merge in RDR opengl

Xcedf commented 7 years ago

Sorry about the wrong info, there are no stutters in master, they caused by some of early commits after master ones

kd-11 commented 7 years ago

Its ok. Can I get a trace of before and after the commit that ruined saw II? It seems to be unrelated to zcull if the state management patch is what made the game break

Xcedf commented 7 years ago

If you mean the log here's one before https://mega.nz/#!bEBFkISL!Jcx90MNwsLexq7fycA5FH5IUhwtfgvOzvg5kPFl0LJY and one after https://mega.nz/#!LQJWGTZI!DaqrEQPqKW32uSK4Fsd-7nzazci4gL90KGJPqfLFUXI

kd-11 commented 7 years ago

Please check if https://github.com/RPCS3/rpcs3/pull/3168 fixes the issues

SakataGintokiYT commented 7 years ago

@kd-11

[ Saw 2 ] *No change #3168

*RenderDoc with zcull : *RenderDoc before zcull:

money123451 commented 7 years ago

well that new zcull build 0.0.3-867 on you appveyor (KD-11) did this to rdr under opengl lol 2017-08-06 22_02_20-fps_ 5 17 _ opengl _ red dead redemption _ blus30418

kamer1337 commented 7 years ago

still look like this with #3168 game looks like this only if i look at specified direction. maybe with zcull for vulcan its not going to happen in future

zcull

i dont know how to use renderdoc

kd-11 commented 7 years ago

@money123451 RDR works perfectly for me although I now suspect a driver issue. It all comes down to how reliable the driver is at generating occlusion reports without notice. @kamer1337 Its not really zcull causing that its some of the restructuring. Unfortunately the saw traces are just blank on my system so I'll need to find another case where reorganizing the renderer breaks things

SakataGintokiYT commented 7 years ago

@kd-11 Do you need trace before this commit and after ? https://github.com/kd-11/rpcs3/commit/7411bc27ba0486834249fafc14bc72677699e519

kd-11 commented 7 years ago

Yes. I have however pushed another commit to be a little more strict with how things work now since I did not initialize the pipeline with defaults anyway. Saw is very broken on master I'm surprised it even works. Vertex rewrite solves most of those issues, but thats a different problem. Just check if the latest commit changes anything

SakataGintokiYT commented 7 years ago

same on 5e12f9c

kd-11 commented 7 years ago

Are these two games the only ones affected?

kd-11 commented 7 years ago

Looks like RDR also regressed again. I'll keep checking but I dont think the commit listed is the one that breaks visuals. I suspect its zcull itself. It may also affect the skate game if it uses zcull to decide where the sun is visible like demons souls

kamer1337 commented 7 years ago

tested skate 3 its also regressed on opengl, broken graphics at specified direction

skate3

and floor is getting white, probably sun related

kd-11 commented 7 years ago

Can you check the log for RSX: Conditional rendering mode enabled (mode 2)?

kamer1337 commented 7 years ago

the log is spammed with RSX: Conditional rendering mode enabled (mode 2)

kd-11 commented 7 years ago

@SakataGintokiYT Does that message also appear in SAW?

SakataGintokiYT commented 7 years ago

@kd-11 No

SakataGintokiYT commented 7 years ago

@kd-11 https://github.com/kd-11/rpcs3/commit/7411bc27ba0486834249fafc14bc72677699e519

[Saw 2] RenderDoc Before RenderDoc After

kd-11 commented 7 years ago

I pushed another commit. Not sure if it does anything for saw since that rdc is blank for some reason. Its probably just a renderdoc bug though

money123451 commented 7 years ago

it seems like build 0.0.3-870 commit c4ee280 fixed lots of the issues in RDR with opengl still has a few things pop out that should be loaded in but a step in the right direction. 👍 2017-08-07 10_18_47-fps_ 2 26 _ opengl _ red dead redemption _ blus30418

SakataGintokiYT commented 7 years ago

@kd-11 bez tytulu

no change : c4ee280

kd-11 commented 7 years ago

Thats a persistent image from the previous frame. Checking actual draws shows no output but the result is already there for some reason. Clear before pass also doesnt work so I cant actually tell which parts of the command stream actually affect output. Also, index buffers are not properly scoped so during playback renderdoc ends up with out-of-range access errors (You can check mesh output - its missing/empty on most passes)

kamer1337 commented 7 years ago

no changes with latest commit for skate 3 and tony hawk

kd-11 commented 7 years ago

Ok, so after taking a deeper look there are several minor bugs introduced by the restructuring. Will update soon

kd-11 commented 7 years ago

Should be fixed now

SakataGintokiYT commented 7 years ago

@kd-11 [7ae11174] bez tytulu

kamer1337 commented 7 years ago

tony hawk's project 8 fixed. skate 3 still the problem occur

kd-11 commented 7 years ago

The problem was always there in skate 3. Its a known issue

kamer1337 commented 7 years ago

screenshot of game before zcull, bushes look ok. its new adwwd

zcull: zcull1

zcull2

Xcedf commented 7 years ago

Confirm last commit fixed saw ii, thanks, don't have regressions in my other games

Luffykun007 commented 7 years ago

@ Kd-11 I'm having this error in RDR in its build 0.0.3-871

capturar

kamer1337 commented 7 years ago

@Luffykun007 its not related to this topic and you use vulcan, zcull is opengl only atm

Luffykun007 commented 7 years ago

Right understood!

money123451 commented 7 years ago

yap that is why I have been testing with opengl here even if I have a RX 480 I didn't want to ignore the regression that might make its way into vulkan.

Asinin3 commented 7 years ago

@SakataGintokiYT The TVs in the screenshot you posted are white, is that a regression?

SakataGintokiYT commented 7 years ago

@Asinin3 Nope Before : Black textures and invisible models

Asinin3 commented 7 years ago

I have found a regression with zcull in Ni No Kuni:

zcull ( RPCS3 v0.0.3-8-7ae1117 ) - latest master https://my.mixtape.moe/imtwij.mp4 Log + Save (at the location shown) + Mirror with videos in-case mixtape.moe is down again... RPCS3.zip Edit: And after zoning in and out of areas you will get this black/white texture bug on all kinds of surfaces throughout the game, doesn't happen instantly but you should notice it within ~5 minutes of zoning in/out of areas. It appears to just get worse and worse until I see black/white textures on almost everything. rpcs3_2017-08-09_13-12-37 2017-08-09_12-00-17

Restarting fixes the above issue with weird textures however the clipping and pop-in issues remain. rpcs3_2017-08-09_13-19-53

I can confirm that all of those issues do not appear in the master without zcull after extensive testing. ( RPCS3 v0.0.3-3-02845f5 )

@SakataGintokiYT Yeah, I know but I noticed that the TVs went white and thought maybe it was a regression you didn't notice.

kd-11 commented 7 years ago

Should be fixed in vertex_rewrite. Its a bug in the game itself that we did not check for.

Asinin3 commented 7 years ago

It's still not fixed in latest vertex_rewrite: https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.3-891 and the newer master: https://ci.appveyor.com/project/rpcs3/rpcs3/build/0.0.3-5656

I deleted the data folder between builds. image rpcs3_2017-08-12_06-32-08

kd-11 commented 7 years ago

It seems to be triggered by the re-enabling of depth clamping if its only on openGL. Another issue already tracks the issue so I'll close this one since the other issues are fixed.

Asinin3 commented 7 years ago

@kd-11 While I don't get the pop-in or clipping issue in Vulkan I can't say whether or not the black/white/invisible texture bug exists or not because the game crashes so quickly for me with vulkan that I don't have enough time to attempt to reproduce it. However I haven't hear of anyone else having that issue with Vulkan yet.

Edit: Are you saying that the depth clamping is causing all of the issues or just the bug with the textures? It may not have been obvious with my earlier post but the clipping and pop-in issue still exists in the latest vertex_rewrite builds.

kd-11 commented 7 years ago

Ni no kuni issue is tracked separately. Closing this.