DirectX 11 render system - work-in-progress

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

DirectX 11 render system - work-in-progress

Post by Assaf Raman »

I few months ago I started a directX 10 render system. I never finished it but did lots of work.
I saw in Sinbad blog that he started to work on it also.
SO – here is my code. Not done…

Hope it helps someone.
http://assaframan.googlepages.com/Direct3D10.zip
Last edited by Assaf Raman on Sun Jan 13, 2008 2:59 pm, edited 2 times in total.
Watch out for my OGRE related tweets here.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Thanks Assaf - someone else emailed me some work-in-progress too so I shall attempt to unify & finish everything ;) It's a spare-time activity though so it might be a while.
User avatar
Lee04
Minaton
Posts: 945
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden
x 1

DirectX10.1

Post by Lee04 »

DirectX10 is a bit "old" by know to architect an Ogre Rendersystem around.
DirectX 10.1 specs are available already. Maybe it should be taken into account as well now, even if the hardware won't be available in a while.

I started as well on a DX10 rendersystem got nowhere because I wanted to support input assembly etc. and all the good DirectX10 features.
I realized that Ogres render system needs some new refactoring to fit these in and then maybe even openGL3.0 should be in that refactoring design as well as DX10.1.

Has anyone recompiled Ogre for Vista version of DirectX9 by the way?

I don't have Vista myself yet.
Which hasn't stopped some projects using it.
We used reference raster etc.
Ph.D. student in game development
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX10.1

Post by Assaf Raman »

Lee04 wrote:Has anyone recompiled Ogre for Vista version of DirectX9 by the way?
Yes. Everything works.
Watch out for my OGRE related tweets here.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Yeah, I use Ogre / Dx9 on Vista fairly regularly. I would rather stick a fork in my eye than do any serious work using the Dx10 reference rasteriser though. It would be less painful.

Dx10.1 doesn't add any major architectural changes, it just tightens a few of the requirements. Basically, it's the variable hardware caps of Dx9 by another name.
User avatar
Lee04
Minaton
Posts: 945
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden
x 1

Post by Lee04 »

@Assaf:
Lee04 wrote:
Has anyone recompiled Ogre for Vista version of DirectX9 by the way?

Yes. Everything works.
Did you get the promised X6 performance boost then???
Ph.D. student in game development
User avatar
bibiteinfo
Gremlin
Posts: 197
Joined: Wed Apr 12, 2006 2:48 pm
Location: Montreal, Canada

Post by bibiteinfo »

Lee04 wrote:@Assaf:
Lee04 wrote:
Has anyone recompiled Ogre for Vista version of DirectX9 by the way?

Yes. Everything works.
Did you get the promised X6 performance boost then???
You mean / 6 ? :roll: I know where I was working before, switching DX9 code from XP to Vista had a really big gasp because drivers where not yet finished and ready for use and this was in may, might have change. But basicly it should not be * 6, you are limited by your GPU, not the OS.
Image
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

I have noticed no speedup whatsoever. My laptop and desktop use vista+dx9 now and it seems like a slight slowdown.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post by Assaf Raman »

Lee04 wrote:Did you get the promised X6 performance boost then???
No. Seems the same.
Same GPU + same comuter = same performance.
Watch out for my OGRE related tweets here.
User avatar
Lee04
Minaton
Posts: 945
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden
x 1

Post by Lee04 »

I mean of course with a DirectX 10 card Nvidia 8800 not a DX9 card and using the new DirectX9 Vista Dx10 features the right way.

And you have patched Vista with the graphics card patch for high performance cards....etc.


The reason I ask is because I am about to port a DirectX projects renderer...

I am however stuck with VS 2003.... but I tried compiling and running the DX9 Vista sample and move it to Vista and it worked to compile it with VS2003 as long as I have the Vista SDK installed in my XP system.

Cool sample...

Os does effect things virtualization and driver integration and the design of everything has chaged in the OS especially for graphics driver.
Hopefully it should make a difference. Of course you have to change some things in your DX9 implementations as the manual and examples shows to get the performance boost.

And not all applications benefits it depends what bottlenecks they have etc.

It was a bit hard to find the Vista DX9 ex things they are not in the DirectX SDK.... but in the Windows SDK.

Yeh strange thing it says in a FAQ at MSDN that you can mix DX9 and DX10 functions with in the same running application....strange...or did I misunderstand the FAQ perhaps?


Something for Ogre perhaps??
Ph.D. student in game development
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

The x6 speedup is mostly a bunch of marketing crap. I believe it's based on the fact that you can now use the geometry shader to select the target texture in a texture array and thus you're able to render to all 6 faces of a cubemap at once. The x6 across the board line is a myth.

They've also reduced the CPU overhead in issuing render batches which helps, but it won't be x6.

Basic skeleton Dx10 rendersystem is in CVS now, lots still to do to before it's functional since so many things have changed, but it compiles so it's a start. I'll be adding to it incrementally over the next couple of months, firstly starting on resolving the new stricter locking behaviours and state objects. Assistance welcome if anyone wants to offer it, like in the MRT / HardwarePixelBuffer area where a lot has changed. Only once we have the rendersystem implementing all the Dx9 functionality properly will I start adding the new Dx10 features.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

I assume you need Vista to work on this? I presume it's enough to have a late-model DX SDK to build it of course.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

To run it you need Vista yeah, but to be honest since it doesn't actually _run_ properly yet anyway that's somewhat academic ;) It'll start up but that's about it so far.
User avatar
Lee04
Minaton
Posts: 945
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden
x 1

Idea scriptable input assembly script?

Post by Lee04 »

Can we have a scriptable input assembly for Dx10?
Ph.D. student in game development
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Explain.

The issue with IA on Dx10 is that it's stricter than Dx9. In fact, it actually goes back to some degree to how Dx8 used to be, which I hated. That is, that you have to store the result from the compilation of a vertex shader and use that as a basis for matching the vertex buffers. It puts a rather higher coupling between the geometry definitions and vertex shaders (material system) than I personally like. In Dx9 you basically match up the geometry and the vertex shader inputs, and anything that's missing is just wither blank or random. Allows you to keep a nice separation between shading and geometry data, but that's been coupled together again. It's one of the gaps I'll have to bridge in Dx10 there will probably have to be an intermediate structure that matches IA to VertexDeclarations and caches the result for re-use, in a similar way to how I'm going to have to build and reuse state objects based on Pass.
Bryan_See
Kobold
Posts: 25
Joined: Fri Mar 02, 2007 4:35 pm

Post by Bryan_See »

I've downloaded the DX10 render system, and I'm porting to Axiom, and finish it from here, and maybe add DX10.1 support sometime in the future.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post by Assaf Raman »

Use my code as a base - you will have most of the base for type conversion.
Watch out for my OGRE related tweets here.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Re: DirectX10.1

Post by :wumpus: »

Lee04 wrote:DirectX10 is a bit "old" by know to architect an Ogre Rendersystem around.
DirectX 10.1 specs are available already. Maybe it should be taken into account as well now, even if the hardware won't be available in a while.
Old? How many people do you think there are that can run a DirectX10 application at all, as it requires both a very recent GPU and Vista? Well, how many of those have DirectX10.1 cards? Even the latest NVidia cards cannot do DX10.1 yet, so supporting it is more an academic exercise if anything.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: DirectX10.1

Post by xavier »

:wumpus: wrote:
Lee04 wrote:DirectX10 is a bit "old" by know to architect an Ogre Rendersystem around.
DirectX 10.1 specs are available already. Maybe it should be taken into account as well now, even if the hardware won't be available in a while.
Old? How many people do you think there are that can run a DirectX10 application at all, as it requires both a very recent GPU and Vista? Well, how many of those have DirectX10.1 cards? Even the latest NVidia cards cannot do DX10.1 yet, so supporting it is more an academic exercise if anything.
Wumpus, you've been around long enough to know to avoid biting on Lee's Direct3D10 trolls... ;)
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post by Assaf Raman »

Got is going once more.
Now it compiles and runs - but black window for now.
I will work on it this weekend and I hope I get it to render the simple samples.
Here is the compiling and running code: OGRE_Direct3D10_RenderSystem_compiles.zip

You will need the latest OGRE (v1-4-6) and the latest dx sdk (November 2007)

I will post any code that I will create in this thread until I will get it to render – then I will move to the showcase.
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post by Assaf Raman »

The support for the "old" hlsl parameters takes me forever. They did a big change there, it is much harder to enumerate the parameters and update them. I am almost done with that.

My next step will be to create a sort of "general" hlsl shader, in dx 10 – you can't render without a shader – and lots of OGRE sample and code renders without a shader – so I will need to solve it before we will be able to see anything.

I hope to have it rendering the simple demos and GUI by Sunday night.
Watch out for my OGRE related tweets here.
User avatar
SiENcE
Goblin
Posts: 231
Joined: Thu May 11, 2006 3:07 pm
Location: Berlin
Contact:

Post by SiENcE »

Keep on going !

I read this thread everytime there is something new. So please keep this "dev.-blog" comments :-).

regards
MartinBean
Gnome
Posts: 331
Joined: Thu Oct 25, 2007 12:21 pm
Location: The Netherlands

Post by MartinBean »

Yeah, although nobody responses... I'm sure many are following it...

We support you Assaf... in silence, but still... :D
I have not failed... I've just found many ways that wont work
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post by Assaf Raman »

Thanks for the support! :D
I hope I will finish the basic rendering until tomorrow night so we will have the base for this new render system available for all to improve and test.
Watch out for my OGRE related tweets here.
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

Isn't Sinbad plugging away at this as well?
Post Reply