Game Development Community

DirectX 11 - Status

by Lopuska · in Torque 3D Professional · 03/15/2014 (5:02 pm) · 118 replies

Hi All!

Ok, we have cleaned the entire DX9 Layer! thanks to all devs that help and support me.
Now we have a modern DirectX9 layer without fixed function and deprecated functionality.
I think that The DX9 layer was really unmodified since a long time (:

We can talk about DirectX 11...

Here you have DirectX 11 Status:

Note: at the moment there are no DX11 features, but just a port.
The goal is to have a working version of DirectX 11 so next, we can develop support for tipical nextgen features.

Contributors: Andrew Mac, ZeroFault

gfxD3D11CardProfiler - OK
gfxD3D11Cubemap - OK
gfxD3D11Device - OK
gfxD3D11EnumTranslate - OK
gfxD3D11IndexBuffer - OK
gfxD3D11OcclusionQuery - OK
gfxD3D11QueryFence - OK
gfxD3D11Shader - OK
gfxD3D11StateBlock - OK
gfxD3D11Target - OK
gfxD3D11TextureManager - OK
gfxD3D11TextureObject - OK
gfxD3D11VertexBuffer - OK

repository:
https://github.com/Lopuska/Torque3D/tree/D3D9_D3D11_R%26D
#21
03/18/2014 (11:01 am)
Thanks Andrew, that worked!
#22
03/18/2014 (11:54 am)
@ZeroFault:
That was my initial thought as well and that works for complete overwrite situations but are there any cases in the engine where it would expect a non-dynamic texture to be able to be read through the lock function? For instance the copyToBmp() function gets it's data from lock() so a non-dynamic texture would dump empty data. Is that normal behavior for a GFXTextureObject ?

@Timmy:
Definitely. I'm looking forward to hashing out the details on new features. I've been reading a lot about tessellation in opengl 4.0/dx11. As soon as DX11 is functional I'm starting work on tessellation.
#23
03/18/2014 (12:27 pm)
@Andrew
Ah, okay I read the code wrong in the texturobject::lock. I initially thought it was meant to write to the texture on the GPU, but it's actually meant to read it and save it to a bitmap. I was updating D3D11vertex buffer and index buffer where earlier so I got confused. Also, your probably right that there are probably no cases where it's not a dynamic texture.
#24
03/18/2014 (12:41 pm)
You are right though, it would produce an error if you try to map to a non-dynamic texture. Map/unmap and dynamic textures are intended for per-frame updates, where as UpdateSubresources isn't, so I think we have some wiggle room in terms of the performance of lock/unlock when it's non-dynamic.

Perhaps I could use a staging texture and CopySubresource() to it, then map to that. Unmap when finished and push the changes back with UpdateSubresource. This is the approach I was going to take for render targets anyway. I'm not sure if you're really intended to be able to push back changes to a render target though. It sounds wrong. Even if you did it for one frame it would be overwritten next frame, would it not?
#25
03/18/2014 (3:43 pm)
I wish i could help but i do not even know where to start with all of this... Thanks to you all on this.
#26
03/18/2014 (3:54 pm)
@Andrew
I manage to get it to compile but I got an error..

imageshack.com/a/img829/6977/0ic2.png
Not for sure why this occurred maybe I did something wrong: maybe someone could help me figure this out, but for now I'm going to take a little break and try again in a few minutes!!

@Kevin
If you have time VS2010 - 2013 or studio expresses, then all you'll need to do is download the windows sdk, and andrew's refactored link above and you should be good to go...
#27
03/18/2014 (4:02 pm)
@Kory:

I started seeing this pop up on new projects as well. It doesn't on the old so I'm not sure if the old are still relying on the dxsdk in some way or if I missed a spot setting up the new projects. Either way, if you look in Templates/Full on d3d9-refactor you'll see a copy of the dll. If you get another dll error about XAudio2_8.DLL just remove sfx/xaudio from the project and rebuild. I've yet to find out how to fix that one.

github.com/andr3wmac/Torque3D/tree/d3d9-refactor/Templates/Full/game
#28
03/18/2014 (4:41 pm)
@Andrew
Edit: nevermind

@Kory
The D3DCompiler_46.dll and newer aren't included in directx updates anymore. They are meant to be included in the executable directory of the game you are running. D3DCompiler dll should be in your Win 8 SDK/redist folder. Just copy it to your game folder and it should work.
#29
03/18/2014 (5:53 pm)
It was asking for d3dcompiler_47.dll.. sorry the pic cut that part off. I just change the name of d3dcompiler_46 to _47 but yes now it's erroring about the Xaudio2_8 but I just seen Andrew suggestion so I'm going to try that..
#30
03/21/2014 (3:21 am)
Just a quick question - is this seperate files going straight to directx 11 or are you working directx 9 through if defined and then 10 10.1 and then 11?
#31
03/21/2014 (5:58 am)
Thomas
I think it's DX9 refactored and DX 11 (once it's finished)...
#32
03/21/2014 (6:02 am)
O ok so basically updated dx 9 layer and then dx11 on top
#33
03/21/2014 (6:27 am)
Hi =)
Yes. My job on directx9 refactor is now finished. This evening I'll publish last patch.

Forgot WindowsXP. It's not compatible, because my refactor is based on the DirectX9Ex. Sorry if someone use it :(
You need to have Windows Vista or +.

http://www.microsoft.com/en-us/windows/enterprise/end-of-support.aspx

this is for people who know what is DirectX9Ex, basically it's a update to make DirectX9 works better on the last Microsoft's operating systems:

http://msdn.microsoft.com/en-us/library/windows/desktop/ee890072(v=vs.85).aspx

Now I'll continue with DirectX11 work :)

Bye!
#34
03/21/2014 (6:54 am)
I think your implementation is going to be better than mine - I set it up in such a way that the old dx 9 layer was not changed jus a few other features added in and them implemented dx10 10.1 with all of it's features - I thought this way worked best because there Wer major changes from dx9 to 10 rather than 10 to 11, 10 and 11 are very similar in my book just a few added features and cleaner code here and there sorry to keep you from your work but just wondering if you could tell me if you have sorted out the render states code? Dx9 had a prepared function for this were as dx10 and 11 now have rasterizer function I set up my own function to deal with this change to keep it as similar to torque code as possible - for the enum and what not
#35
03/21/2014 (11:22 am)
Great work! This is really coming along! Maybe after all these general upgrades we can work on new features to the engine (Kismet-type branch, Integrating weather, etc). Just simple things that make the engine better! I would definitely help in the project...
#36
05/04/2014 (1:01 am)
Is this project still going? It looks like it was almost done on Git, but Anis hasn't done anything for 20 days now...
#37
05/06/2014 (8:08 am)
Sorry guys!
It was a intense period for me.
I'm gonna make a complete commit in a new branch of the part to avoid trianglefan drawcalls. Next, Luis will integrate this changes in his repo to make a more uniform cross-api.

For the reason about we have decided to deprecate trianglefan, look my other DX9/DX11 thread.

I've sent a request to AMD and ask them the mantle devkit/api... Will see that!

See y!
#38
05/06/2014 (3:00 pm)
Ok, Here there are the new branch with only the changes for trianglefan drawcall avoidance.

https://github.com/Lopuska/Torque3D/tree/trianglefanavoid
#39
05/06/2014 (3:59 pm)
Quick note: for reasons of convenience, I've made a personal branch; so I can easily make other experiments with more flexibility.

My main branch now will be:
https://github.com/Lopuska/Torque3D/tree/D3D9_D3D11_R%26D
#40
06/07/2014 (7:17 am)
Just wondering if there is any thing new?
Is this branch ready for testing on D3D 11...thx!!