简体   繁体   English

D3D功能级别问题

[英]D3D Feature Level issue

Can someone explain to me, what will happen, when someone try to use higher d3d_feautre_level than one supported by Users GPU? 有人可以向我解释一下,如果有人尝试使用比Users GPU支持的更高的d3d_feautre_level,会发生什么?

This is what i dont understand so i would appreciate, if someone could help me with this question 这是我不明白的地方,所以如果有人可以帮助我解决这个问题,我将不胜感激

When you create the Direct3D device, you provide a list of Direct3D hardware feature levels your application supports. 创建Direct3D设备时,将提供应用程序支持的Direct3D硬件功能级别列表。 If the hardware doesn't support any of those feature levels, the device creation fails. 如果硬件不支持任何这些功能级别,则设备创建失败。

For Direct3D 11, you provide D3D11CreateDevice the supported feature levels as the 5th & 6th parameters: 对于Direct3D 11,请为D3D11CreateDevice提供支持的功能级别作为第5和第6参数:

HRESULT D3D11CreateDevice(...
    const D3D_FEATURE_LEVEL *pFeatureLevels,
    UINT FeatureLevels,
    ...);

If you pass nullptr / 0, it defaults to: 如果传递nullptr / 0,则默认为:

D3D_FEATURE_LEVEL lvl[] = {
    D3D_FEATURE_LEVEL_11_0,
    D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0,
    D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1 };

For Direct3D 12, D3D12CreateDevice takes the minimum Direct3D feature level you support as the 2nd parameter: 对于Direct3D 12, D3D12CreateDevice将您支持的最低Direct3D功能级别作为第二个参数:

HRESULT WINAPI D3D12CreateDevice(...
    D3D_FEATURE_LEVEL MinimumFeatureLevel,
    ...);

Most applications use D3D_FEATURE_LEVEL_11_0 as the minimum. 大多数应用程序最少使用D3D_FEATURE_LEVEL_11_0

Direct3D 12 requires both Windows 10 and WDDM 2.0 drivers that support it. Direct3D 12需要支持它的Windows 10和WDDM 2.0驱动程序。 There are no device drivers for any video card lower than Feature Level 11.0 at this time. 目前没有适用于功能级别11.0以下的任何视频卡的设备驱动程序。

See Direct3D Feature Levels 请参阅Direct3D功能级别
Anatomy of Direct3D 11 Create Device Direct3D 11创建设备的剖析
Anatomy of Direct3D 12 Create Device Direct3D 12创建设备的剖析

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

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