Dolphin, the GameCube and Wii emulator - Forums

Full Version: Custom D3D Version with massive performance boost and a lot of rendering fixes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Hi,

Teasing first :
DK returns : 17ms saved on the wide view of the island level selection.
One Piece Unlimited Aventure : 9ms save on the press A screen.
ETC…


Because the D3D back end is far behind compared to GL, at least on the games i tested, i decide to look at why. I made a first batch of changes in a fork to found here : https://github.com/galop1n/dolphin/tree/D3D

As a long date Perforce user, i am not used to GIT yet. So if you have advice in regards to the philosophy behind code review and pull requests to the dolphin project, just light me Smile
Also, i already saw several different coding style in sources, is there a document a bit less practical than "when in Rome, do as the Romans do" to not bring mine in the battle ?

For the story behind what i did :
Sadly, DX11 API and the underlying nVidia/AMD driver is far more costly than the GL one, even if used correctly. And correctly is quite perpendicular on some aspects to what should be done compared to a fully home made graphic engine ( like immutable vertex buffers versus everything streams each frame ). DX12 will solve most of it once it got a public release but there is already some effective clean because there is a lot of abusive D3D redundancy in the place Smile

On the island level selection map of Donkey Kong Country Returns, i went from 37ms to 20ms for example Smile i lost 2ms from the original 18ms best shot while going from crappy code change to an acceptable and maintainable one, but it will be possible to get it back of course. It was because i went a little lower level on some redundancy state detection and eviction from my crappy test Smile

Feel free to comment or give advice on how to work on a public project.

NVIDIA DRIVER BUGS DISCOVERED : 2

EDIT 2014/06/14 : https://drive.google.com/file/d/0BwFELyKmwoCnM3ZsRzZXU1U3X3M/edit?usp=sharing ( link change if you got the invalid build before that edit, redownload )
* WARNING, WIP, only D3D is working and need D3D11 capable GPUs (temporary of course).
* Please delete your shader cache Smile
* Mario Kart Wii EFB2Ram crash fix
* HOT : GPU Texture Decoder.
* Zelda WindWaker Link shadow flicking + Sonic Gems tails stage missing parts fix version 1
* Did not forget to hide the fast depth check box this time Smile
* Start refactoring over d3d resource management for less error prone code that may lead to resource leak and nasty bugs.

EDIT2 2014/06/08 : https://drive.google.com/file/d/0BwFELyKmwoCnay13ekh2aUJvV2c/edit?usp=sharing
* nvidia have a bug with the shader generation flag D3DCOMPILE_IEEE_STRICTNESS that mess the fog in some circumstances. Version without the flag solves the stuff.

EDIT 2014/06/08 : New Build https://drive.google.com/file/d/0BwFELyKmwoCnMktyTzc5Ui1uUXM/edit?usp=sharing
* Please delete your shader cache Smile
* Rework and clean on the zfighting issue, that time, Zelda Windwakers waves or Zelda SS menu is ok.
* EFB2Ram texture encoder change from Pixel Shader to Compute Shader.
* Workaround on the EFB2Ram sync issue with nVidia driver, works for me, not as effective on JMC47 tests, we will have to contact nVidia for that

EDIT 2014/06/05 : New Build https://drive.google.com/file/d/0BwFELyKmwoCndGIyYzJHaVh5eVU/edit?usp=sharing
* Please delete your shader cache Smile
* D3D Optimizations of course
* Metroid FMV blue tints fix http://imgur.com/UuFN6NC
* SMG2/SBrawn/FireEmblem and probably others inconsistent darkened texture fix. http://imgur.com/a/q6UJ8#0
* Fast Depth hack remove as it is not a hack anymore, the per pixel depth still used with ZTexture ( of course ) and everything else use a fast path. http://imgur.com/a/CIpeJ#0 http://imgur.com/a/auE0D#0
* Fix Zelda time shift effect : http://imgur.com/a/Y4R2h#7
* Fix Mario Tennis and Golf spiky triangles ( hot fix, the full Wii GPU feature still need a bit of work, but it is likely that no one use it, REALLY !!! ).
* Mario Tennis invalid light setup (that should not exist in the first place) use a lighting similar to what the hardware display ( big hack ), will need hardware test to figure what is really happening. http://imgur.com/a/OuYOy#2
* Hack, zFreeze disable Depth write, no more z fighting in Mario Tennis but of course you may see object that should be hide by the floor. real zFreeze implementation to come. http://imgur.com/a/OuYOy#1
* Clean some shader to get ride of a not wanted compatibility flag with deprecated features.
* The dump texture option does not hurt the framerate anymore by pruning an abusive high amount of file system look up for already existing texture.
Oh yeah, DK could use some speed ^^
Would you per chance have that in a ready-to-go Dolphin build? Like, for us low-level users to test? ^^
I put a custom build here ( file -> download ) : LINK REMOVED

DolphinLTCG.exe is an untouched build, minus the fps display the frame duration in milliseconds.
DolphinD3DLTCG.exe is with my changes too.
I was unable to find any performance boosts in the quick tests I did; do you have any situations in particular that you're trying to speedup?

Edit: Ignore my results for now... I'm an idiot. Rendering video in the background is a great way to invalidate quick performance tests. the fact I was getting over full speed sitll astounds me.
Another idiot here ^^ For me every game crashes at start. I put your exe (the DolphinD3DLTCG one from the zip) into my previous Dolphin folder and started it from there. I guess that was wrong? -_-
I think his builds are incorrectly made, some of the audio backends are missing.
Will try it now.
Hm? Strange, now it's working. Sorry - I don't know why it crashed (several times) before O_o

EDIT: Gnaah, it DOES still crash. I just had it on OpenGL to test something else. With D3D it crashes for me.
It says it can´t start because it needs SDL2.DLL and that is missing on my PC.
It is possible, i saw there was a depot with tools to automatize builds but do not yet look at it ( one thing at a time ). I just upload the executable as it it the unique thing that ends in the binary folder ( minus DSPTool.exe but i think it is not needed right ? ).

There is CMake config files but the projects are also on the depot, so i may also miss something else…

In fact, it is obvious that i may miss important setup, i have for example not installed the June 2010 SDK as it is deprecated for years but the only headers for XAudio 2 on Seven are in it and should be ripped and put directly on the externals as the headers from VS2012/2013 are only for windows 8.

(05-13-2014, 08:14 AM)DJBarry004 Wrote: [ -> ]It says it can´t start because it needs SDL2.DLL and that is missing on my PC.

That DLL should already present in your dolphin folder…
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39