Jump to content

Direct3D11 Testing


Timmy
 Share

Recommended Posts

Hey Everyone,


As Jeff mentioned in the 3.8 release thread, i have been working on getting the awesome work anis started here https://github.com/Lopuska/Torque3D/tree/D3D9_D3D11_R%26D up and running. I have fixed a lot of problems, fixed a few performance problems and converted all shaders in the common shader folder to use a new helper macro system to enable Direct3D9 and 11 shaders to place nice together (see post below).


It's coming along well and while i wanted to fix a few more things before starting this thread, time has forced my hand. So don't expect it to be full production quality and ready yet, it's not. It's all a work in progress.


Source Code:

https://github.com/rextimmy/Torque3D/tree/d3d11


Problems i know about:

  • Glow blur problem
  • No instancing support yet
  • Windowed mode and editor toggle. See here
  • Feature levels not properly implemented yet

 

Due to the sheer amount of shaders that need switching over to the helper macro system (this does not include shadergen shaders however), without a shadow of doubt i have missed something somewhere. One thing you will notice compared to D3D9 is the dramatic drop in memory usage and a faster loading of levels.


There is one performance problem i am aware of involving the constant buffers, long story short i can fix this using 11.1 feature level but unfortunately this is only for Window 8 or above. This is one area i need to really fix up and i will when i get the time. So for now i'm not concerned about performance but rather getting it all working and than i will go and start profiling it in detail and fixing up any performance issues.


Compiling


If you are using Windows 10 and want to run in debug mode you must have the graphics tools installed. The easy way to do this via an admin command prompt

 

Dism /online /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0

 

Unfortunately the old D3D9 is still using the deprecated Microsoft DirectX SDK. This will cause a lot of warnings when you compile and it will fail to compile with VS 2015 due to the use of dxerr . I will fix this up in time but for now i wanted to keep the fully working and 100% tested D3D9 device in place until D3D11 is 100% working.


If you use CMake the D3D11 code will be automatically included and if you use the project manager you will have to select "Direct3D 11 Rendering". I have also included VS 2013 to the project generator.


It would be great if people could start testing this out and reporting problems, there will be more than what i listed above. Please only use the full template, the empty template has not been updated.


There is a second thread over here too about this. Use either thread, doesn't matter.

Edited by Timmy
Link to comment
Share on other sites

Is VS 2010 definitely finding/using that windows kit directory? You can remove this line if you like https://github.com/rextimmy/Torque3D/blob/d3d11/Engine/source/gfx/D3D11/gfxD3D11Device.cpp#L271 it will work than (should do anyway)


If you are not seeing heaps of these type of warning messages than it's not using the windows kit

 

warning C4005: 'D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD' : macro redefinition (C:\Devel\Torque3D-rex-d3d11\Engine\source\gfx\D3D11\gfxD3D11VertexBuffer.cpp)

Link to comment
Share on other sites

  • 2 months later...

Thought i would post and let everyone know i haven't forgotten nor given up on the D3D11 code.


Anyway it was brought to my attention a few people where having trouble running the code in debug mode. I placed a fix on my repo for this, so if you had this problem before it should be ok now.


So in short the debug layers is not essential anymore to run in debug mode but if you do want the extra information this provides you need to


Windows 7: Have at least Windows 8.0 SDK installed

Windows 10: Have graphics tools installed. See my OP for details.


I have started work on the instancing which is the last big feature to add. I have put this in a separate branch until it is finished and than i will merge it over to my main D3D11 branch. If you happen to checkout the d3d11_instancing branch just beware it might not be stable or even work at all, best to stick to the main D3D11.


Once instancing is done it's time to fix some of the smaller issues and start cranking out a bit more performance :mrgreen:


I will write the shader tutorial tonight, i totally forgot about it :oops:

Link to comment
Share on other sites

Thought i would post and let everyone know i haven't forgotten nor given up on the D3D11 code.


Anyway it was brought to my attention a few people where having trouble running the code in debug mode. I placed a fix on my repo for this, so if you had this problem before it should be ok now.


So in short the debug layers is not essential anymore to run in debug mode but if you do want the extra information this provides you need to


Windows 7: Have at least Windows 8.0 SDK installed

Windows 10: Have graphics tools installed. See my OP for details.


I have started work on the instancing which is the last big feature to add. I have put this in a separate branch until it is finished and than i will merge it over to my main D3D11 branch. If you happen to checkout the d3d11_instancing branch just beware it might not be stable or even work at all, best to stick to the main D3D11.


Once instancing is done it's time to fix some of the smaller issues and start cranking out a bit more performance :mrgreen:


I will write the shader tutorial tonight, i totally forgot about it :oops:

 

:) :D :mrgreen:


Thanks @Timmy

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...