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
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
On the island level selection map of Donkey Kong Country Returns, i went from 37ms to 20ms for example 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
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/0BwFELyK...sp=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
* 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
* 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/0BwFELyK...sp=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/0BwFELyK...sp=sharing
* Please delete your shader cache
* 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/0BwFELyK...sp=sharing
* Please delete your shader cache
* 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.
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
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
On the island level selection map of Donkey Kong Country Returns, i went from 37ms to 20ms for example 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
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/0BwFELyK...sp=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
* 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
* 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/0BwFELyK...sp=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/0BwFELyK...sp=sharing
* Please delete your shader cache
* 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/0BwFELyK...sp=sharing
* Please delete your shader cache
* 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.