简体   繁体   English

d3d 11向后兼容d3d10和d3d9吗?

[英]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? 只是有关Direct3D的一个一般性问题,如果我要完全使用hlsl 5.0着色器在d3d11中编写应用程序,这些应用程序是否仍仅与d3d10或d3d9支持的系统兼容,而图形效果和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? 如果没有,除了使用d3d9,d3d10和d3d11之外,我是否真的需要制作2个或3个完全相同的程序的不同版本?

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. 您可能需要将DX11运行时安装到目标计算机上,但是您应该能够在与DX9 +硬件兼容的任何卡上创建D3D11Device。

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. 但这并不能真正为您带来很多好处,因为您需要传递一个支持的功能级别列表(或NULL表示一个列表),并且该函数有一个out parm告诉您获得的功能级别。 So a DX9 only card would come back with D3D_FEATURE_LEVEL_9_1 (or 9_2/9_3). 因此,仅DX9的卡将返回D3D_FEATURE_LEVEL_9_1(或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 ) 功能级别又使您知道可用的d3d11块及其行为如何( http://msdn.microsoft.com/zh-cn/library/windows/desktop/ff476150(v=vs.85) .aspxhttp://msdn.microsoft.com/zh-CN/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. 从这些图表中可以快速得出结论,DX11可能适合覆盖DX10和DX11设备。 It could also be fine for DX9 /depending/ on if you want/need those features. 如果您想要/需要这些功能,则对DX9也可能很好。

Compute Shaders mostly work on DX10 hardware (http://msdn.microsoft.com/en-us/library/windows/desktop/ff476873(v=vs.85).aspx) 计算着色器主要在DX10硬件上工作(http://msdn.microsoft.com/zh-cn/library/windows/desktop/ff476873(v=vs.85).aspx)

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只能安装在Vista +上,这样可以消除出于宗教原因仍坐在XP上的用户(我个人认为这很愚蠢,但这只是您必须意识到的事实)
  • DX11's killer-feature (hardware tesselation) is only available on DX11-compliant hardware. DX11的杀手级功能(硬件镶嵌)仅在兼容DX11的硬件上可用。 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). 几何着色器仅在DX10.0级硬件(或更高版本)上可用。 So DX9-class HW is out of equation... again... 所以DX9级硬件又不合时宜...
  • Compute shaders are somewhat available on DX10.0+-class hardware (allthough quite limited), but completely unavailable for earlier hardware. 计算着色器在DX10.0 +类的硬件上有一些可用(尽管非常有限),但对于较早的硬件完全不可用。

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). 综上所述,如果目标平台是DX10.0 +类硬件,则使用DX11可能会有所作为(因为除了硬件镶嵌之外,差异是可以容忍的,并且/或者存在一些缺少功能的解决方法)。 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. 如果您想支持DX9 HW,建议您坚持使用DX9 SDK,因为这将允许您在XP上运行您的应用程序。

No, it is not backwards compatible. 不,它不向后兼容。 If you want to run on more platforms, a directX11 capable graphics card will certainly support directx9. 如果要在更多平台上运行,则支持DirectX11的图形卡肯定会支持Directx9。 So either develop one time in DX9, or in both DX11 and DX9. 因此,要么在DX9中开发一次,要么在DX11和DX9中开发一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM