Project

General

Profile

Actions

Emulator Issues #6053

closed

Forcing Per Pixel Depth on causes big performance regressions on Nvidia hardware

Added by tttotosai about 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Have you searched the issue tracker for a similar issue?

Yes.

Game Name?

All games.

What went wrong?

All games run 20-50% slower on all backends regardless of settings in revisions 3.5-147 and newer.

What did you expect to happen?

To achieve the same speeds as in 3.5-145.

What steps will reproduce the problem?

Simply playing any game on 3.5-147 or newer and comparing the speed to 3.5-145.

What version of Dolphin were you using?

All from 3.5-147 to the current build.

64 or 32 bit Dolphin?

64 bit.

What version of Dolphin used to work?

3.5-145 x64 and older.

What Operating System were you using and what are your hardware
specifications?

Windows 8 64-bit, Intel i5-2500k processor @4.5ghz, EVGA GTX-650 (310.90 and 314.07 drivers tested), 4GB corsair xms3 DDR3 RAM (dual channel), Asrock z68 pro3 gen3 motherboard.

Any other relevant information or links to logs:

Whatever changed in 3.5-146 or 3.5-147 caused these slowdowns (146 is not available on the main site for testing).

[upload attachments to another site please, dropbox and link here?]

Actions #1

Updated by Sonicadvance1 about 11 years ago

  • Status changed from New to Won't fix

This is due to the force enablement of pixel depth.
This is required for accuracy.

Actions #2

Updated by delroth about 11 years ago

  • Status changed from Won't fix to Questionable

If it affects some configurations that much (-20 to -50% is huge) I'd say it should be made an option again or the performance regression should be fixed. Could someone accurately benchmark this (i.e. using Log FPS to File, several measurements, only difference being Per Pixel Depth enabled/disabled, etc.)? Especially on NV hardware.

Actions #4

Updated by NeoBrainX about 11 years ago

Gotta talk to NV about it, per pixel depth is a bit more aggressive in the depth calculations than it probably needs to be. Unless ztextures are used, depth calculations should be safe to be calculated in the vertex shader. Depends on why the option was introduced in the first place, possibly just as a hack for issues that are merged in the tev-fixes branch.

Actions #5

Updated by delroth about 11 years ago

I thought it was added mostly as an optimization. Maybe Rodolfo knows?

Actions #6

Updated by NeoBrainX about 11 years ago

Per pixel depth was added after per vertex depth, so it definitely wasn't an optimization. IIRC it was supposed to fix the pink water highlights in WW (cf. issue 3313), but it never actually fixed it.
However, it's fixed in tev-fixes. That's why I wonder if there are any games left that actually benefit from forcing per pixel depth calculations.

Actions #7

Updated by rodolfoosvaldobogado about 11 years ago

Forcing per pixel depth was a try to fix some problems but i think they
where fixed later by other changes. To see if is stiil needed all the games
that uses z textures must be tested, for example resident evil series or
baten kaitos game.
the performance drop in nvidia cards is previsible beacuse nvidia is known
to be dependant on early z culling to discard pixels and with per pixel
depth enable this optimization is not aplicable.

Actions #8

Updated by tttotosai about 11 years ago

I can confirm that enabling per pixel depth in 3.5-145 causes most games to fall to the same speeds I get with newer revisions. It's great to finally know why this is happening.

Actions #9

Updated by degasus about 11 years ago

In 7adb74143e4f5beb3c9d1f37d81769ecef765f02 per pixel depth isn't forced any more. But it's only tested on OGL backend and based on GLSL-master branch. Does this commit speed up rendering again?

Actions #11

Updated by degasus about 11 years ago

I broke DX9. Should be fixed in the next commit:

http://dl.dolphin-emu.org/builds/dolphin-depth_texture_fix-3.5-742-x64.7z

Actions #12

Updated by kostamarino about 11 years ago

Seems fine speed wise (similar speed to before per pixel depth was enabled by default) and without issues (i haven't got texture flickering in wind waker).

Actions #13

Updated by tttotosai about 11 years ago

The 3.5-741 build above restored the speeds to usual (pre-3.5-146)for me as well. I tested games on D3D9,D3D11 and OGL and saw similar results to 3.5-145 with per pixel depth disabled.

The speeds aren't quite as fast as 3.5-145 but they're only a few fps off, well within the range of normal fluctuations expected from different revs as opposed to the 50% drops I was seeing. I can post more in depth speed comparisons if I get time.

Actions #14

Updated by degasus about 11 years ago

  • Status changed from Questionable to Accepted

I'll have to do some regression test before merging, but I take it that it's ok.

Actions #15

Updated by degasus about 11 years ago

So, rebased the commit to master and commit there: http://code.google.com/p/dolphin-emu/source/detail?r=642eab92bc8ceb86f5306e26bc3374e464a1ef55

So performance issues should be fixed. Can you please verify the fix?

Actions #17

Updated by tttotosai about 11 years ago

Based on my tests, yes, the performance issues are fixed, but I really only have one game to confirm it.

Metroid Other M and Skyward Sword were the only two I tested that were significantly impacted by enabling PPD, and Skyward Sword would not maintain a connection to my remote long enough to see the title screen. Other M is definitely back up to full speed, at least.

I'll try to find other games that are impacted by PPD being enabled and test them later. I've attached a txt of the speeds I recorded at loading points where the fps were stable in a few games. This compares the speeds of 3.5-549, 3.5-145, and 3.5-145 with PPD enabled.

Actions #18

Updated by degasus about 11 years ago

  • Status changed from Accepted to Fixed
Actions #19

Updated by tttotosai about 11 years ago

Not that it's necessary now, but Metroid Corruption also corroborated the fix.

3.5-549: 108fps 108vps 216%

3.5-145 (PPD OFF): 107fps 107vps 214%

3.5-145(PPD ON): 78fps 78vps 156%

Actions

Also available in: Atom PDF