FatalCatharsis
FatalCatharsis

Reputation: 3567

is d3d 11 backwards compatible with d3d10 and d3d9?

I submitted a question that was actually a bunch of questions in one, so i'm splitting them into their own separate questions, as requested.

just a general question about direct3D, if i was to write an application entirely in d3d11 with hlsl 5.0 shaders, will these still be compatible with only d3d10 or d3d9 capable systems, just with less graphically pleasing effects and the efficiency of d3d11? If so, how much less efficient would it be? If not, would i seriously need to make 2 or 3 different versions of the exact same program, except using d3d9, d3d10, and d3d11?

Upvotes: 2

Views: 2617

Answers (3)

asmi84
asmi84

Reputation: 551

It is backward compatible to a certain degree. However there are few things to keep in mind:

  • DX11 can only be installed on Vista+, which eliminates whose who are still sitting on XP for religious reasons (I personally think it's stupid, but that's just a fact that you have to be aware of)
  • DX11's killer-feature (hardware tesselation) is only available on DX11-compliant hardware. Trust me - it will be really hard for you to refrain from using it because of great array of possibilities it gives you. This can be somewhat compensated for by using geometry shaders, but... see next point
  • Geometry shaders are only available on a DX10.0-class hardware (or better). So DX9-class HW is out of equation... again...
  • Compute shaders are somewhat available on DX10.0+-class hardware (allthough quite limited), but completely unavailable for earlier hardware.

To sum this up, using DX11 somewhat makes sence if your target platform is DX10.0+-class hardware (because aside from HW tesselation, differences are tolerable and/or there are workarounds for missing features). If you want to support DX9 HW, I'd suggest you to stick to DX9 SDK as this will allow you to run your app on XP.

Upvotes: 3

Joe
Joe

Reputation: 2976

I don't believe the previous comment is entirely accurate.

You might need to install the DX11 runtime onto the target machine, but you should be able to create a D3D11Device on any card that is DX9+ hardware compatible.

But that doesn't really get you much, because you need to pass in a list of feature levels you support (or NULL which implies a list) and the function has an out parm telling you what feature level you got. So a DX9 only card would come back with D3D_FEATURE_LEVEL_9_1 (or 9_2/9_3).

The feature level in turn lets you know what chunk of d3d11 is available to you and how it will behave ( http://msdn.microsoft.com/en-us/library/windows/desktop/ff476150(v=vs.85).aspx and http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876(v=vs.85).aspx )

The quick take-away from those charts is that DX11 is probably fine for covering DX10 and DX11 devices. It could also be fine for DX9 /depending/ on if you want/need those features.

Compute Shaders mostly work on DX10 hardware (http://msdn.microsoft.com/en-us/library/windows/desktop/ff476873(v=vs.85).aspx)

Upvotes: 2

Jeff
Jeff

Reputation: 175

No, it is not backwards compatible. If you want to run on more platforms, a directX11 capable graphics card will certainly support directx9. So either develop one time in DX9, or in both DX11 and DX9.

Upvotes: 1

Related Questions