Jump to content
  • Advertisement
Sign in to follow this  
davepl1968

DX11 If targetting DX9, should I use the DX11 SDK and methods?

This topic is 1817 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I really have no -need- for the new features of DX11, but given its the current and cleaned-up interface, I'm tempted to use it.  However, I will need my game to run on machines that do not have DX11 hardware.  I don't need to target XP (Win7 is fine).

 

What I'm (obviously) completely unclear about is:  if I write to the DX11 apis and link to the DX11 dlls, but do not use any DX11-specific functionality, will the game run on a machine that only has DX9 hardware but that -does- have the DX11 redistributable?

 

Since (according to Steam's stats) DX11 penetration is still only about 60%, and I don't require anything new from DX11, it seems like a no-brainer to use DX9.  But if I can write to DX11 and it'll run on DX9 hardware, all the better. 

 

Can someone clarify this for me? 

 

As a tangential question, I've also been playing with the DXUT framework which seems to be able to target both, but if I call D3DX11CompileFromFile to compile a shader (vs_2_0), is there any way that's going to work on DX9 hardware?  

 

Thanks for humoring the DX noob!

 

Cheers,

Dave

Share this post


Link to post
Share on other sites
Advertisement

If I'm not mistaken, you can target the DX11 API if you don't need to support XP, and its a good idea for the reasons you cite. Be aware that Win7 (and Vista?) only got a partial update to D3D11 so some features aren't available, but its not an issue if you're targetting feature-level 9_x anyhow. Your game will run fine on DX9 hardware.

 

If you want to run on Windows RT tablets like Microsoft Surface to reach the widest possible market, target feature-level 9_1 -- which is what all but one of the current ARM-based platforms support, including Surface RT. As an added note, be aware that the current arm-based platforms are typically fill-rate limited (as is the case with SurfaceRT's Tegra3), so be careful to reduce overdraw.

 

As for shaders, you need to select the shader profiles that are appropriate for feature-level 9_1, and you might have to simplify your shader too. Down-level shader profiles support fewer instruction slots than newer profiles, and may not have enough room to run larger shaders that you might prefer with more-capable hardware.

Edited by Ravyne

Share this post


Link to post
Share on other sites

Starting DirectX 11, they introduced the notion of "feature levels".

 

When you initialize D3D with a specific feature level, the API will fail if you try to do something that is only available on higher levels even if your HW is fully D3D 11 compliant.

However it's always advisable of course, to test that your game still works on real older hardware (mostly because of driver issues).

 

Note that your users will still need Windows 7 to play it (or Windows Vista with DX11 installed)

Share this post


Link to post
Share on other sites

As Matias mentions, check out the different feature levels.
 
Feature level 11 gives you access to SM5 hardware (aka DX11 era hardware).
Feature level 10 gives you access to SM4 hardware (aka DX10 era hardware).
Feature level 9 gives you access to SM2 hardware (aka early DX9 era hardware).
 
You only need to use D3D9 if you require XP support, or you specifically want to target SM3 hardware (aka late DX9 / PS3 / 360 era hardware), because it was left out of the feature levels for some reason (simplicity?)...
 
 

As a tangential question, I've also been playing with the DXUT framework which seems to be able to target both, but if I call D3DX11CompileFromFile to compile a shader (vs_2_0), is there any way that's going to work on DX9 hardware?

Yes. The important detail is the target profile (shader model) that you specify. The vs_2_0 profile will produce a SM2 compatible shader, which will work on DX9+ era hardware.

Edited by Hodgman

Share this post


Link to post
Share on other sites

I'd like to keep my options open for a 360 port, which I assume is a lot easier from a DX9 codebase.  Otherwise it sounds like the DX11 api would be the way to go, but I'm thinking it's a lot of work to port DX11 -> DX9 since the 360 probably lacks the whole "Deal with DX11 apis but map them to DX9_3 features".

Share this post


Link to post
Share on other sites

I'd like to keep my options open for a 360 port, which I assume is a lot easier from a DX9 codebase.

Keep in mind though that the general public isn't allowed to make DX9/360 games.
The general public can make 360 games using C# and XNA.
Professional companies that have gone through the trouble (and cost) of becoming a licensed 360 developer can make 360 games using C++ and DX9. If you're not a professional company that can afford to spend many tens of thousands on licensing and hardware, then making this kind of 360 game is out of the question :/

Share this post


Link to post
Share on other sites

I think that the XDK for the xbox one will be released for the public and we will be able to make indie C++ written indie games without paying tons $$$.

But these thoughts are currently only dreams...

Share this post


Link to post
Share on other sites

I think that the XDK for the xbox one will be released for the public and we will be able to make indie C++ written indie games without paying tons $$$.

But these thoughts are currently only dreams...

 

I sure hope that'll be the case. Current info on the Xbox one indie/self-publishing is scant right now but i think we're supposed to get more info about that next month from Microsoft.

Share this post


Link to post
Share on other sites

I think that the XDK for the xbox one will be released for the public and we will be able to make indie C++ written indie games without paying tons $$$.
But these thoughts are currently only dreams...

I sure hope that'll be the case. Current info on the Xbox one indie/self-publishing is scant right now but i think we're supposed to get more info about that next month from Microsoft.

Keep in mind that "indie self publishing" doesn't mean that anyone can publish games on their system.
Sony have been making big noises about how they're now allowing "indie self publishing", but this just means that licensed developers can release a game without requiring them to be signed with a publisher. You still need to be a licensed developer, buy expensive dev-kits, and pay ten grand for a formal submission review prior to publishing...

Share this post


Link to post
Share on other sites

I doubt if its going to be as accessible as XNA was -- if for the technology alone. XNA was much simplified compared to using DX natively, and the content pipeline was huge. That said, given that you had to manage memory anyways if you wanted to do anything worth a darn, and that C# is a curly-brace language, that C++/CX closes many of the remaining gaps where it applies most (the UI layer), and that DX11 has a smaller conceptual footprint than DX9 ever did, I don't think it'll be so traumatic a transition, once you get over fear of the unknown.

 

Here's what they've said publicly:

  • Every Xbox one can run unsigned code.
  • No need for a publisher (I believe by default, Microsoft is considered the publisher, but they don't take ownership of IP, etc)
  • psuedo-quote: "If you wanted to prepare for that future today, developing a Windows Store app would be a good place to start."
  • More info at the end of August, at GamesCon.

 

Putting that all together, I'm wagering on a frills-light SDK based on native C++, C++/CX possibly, that has a similar app-model to Windows Store apps. What I'm kind of curious about, is whether they'll allow access to the game hardware partition on hypervisor. If not, your app will share the OS with some smallish percent of the overall resources -- sources say between 10-20% -- which is still probably about on par with Xbox 360 and very capable. But things would be really interesting if you could use the game partition with 80-90% of the hardware dedicated to your game.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!