简体   繁体   中英

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?

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. 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:

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

If you pass nullptr / 0, it defaults to:

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:

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

Most applications use D3D_FEATURE_LEVEL_11_0 as the minimum.

Direct3D 12 requires both Windows 10 and WDDM 2.0 drivers that support it. There are no device drivers for any video card lower than Feature Level 11.0 at this time.

See Direct3D Feature Levels
Anatomy of Direct3D 11 Create Device
Anatomy of Direct3D 12 Create Device

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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