If D3D11CreateDevice fails, it may mean the hardware doesn't even support the lowest version requested. To give you the most relevant guidance, are you working on: Upgrading an existing DirectX 11 app to DirectX 12?
D3D_FEATURE_LEVEL is an enumerated type that defines a strict set of functionality supported by a graphics processing unit (GPU). Instead of checking for individual capabilities (like "does this card support tessellation?"), a developer can check for a specific feature level, such as D3D_FEATURE_LEVEL_11_0 .
Let me know your goal and I can provide specific code or debugging steps. Adding visual content to the Marble Maze sample d3d_feature_level
To work with D3D feature levels, you'll need to:
D3D_FEATURE_LEVEL is an enumeration (e.g., D3D_FEATURE_LEVEL_11_0 , D3D_FEATURE_LEVEL_12_1 ) that represents a minimum set of GPU features. When creating a device, the runtime returns the highest feature level supported by both the driver and the hardware, up to the requested maximum. If D3D11CreateDevice fails, it may mean the hardware
In the world of Windows graphics programming, ensuring that a game or application runs across a wide variety of hardware—from low-power laptops to high-end gaming rigs—is a major challenge. Microsoft introduced in DirectX 11 to solve this problem, providing a structured way to manage GPU capabilities.
D3D_FEATURE_LEVEL requestedLevels[] = D3D_FEATURE_LEVEL_12_1, D3D_FEATURE_LEVEL_12_0, D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0 ; D3D_FEATURE_LEVEL supportedLevel; HRESULT hr = D3D11CreateDevice( nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, 0, requestedLevels, ARRAYSIZE(requestedLevels), D3D11_SDK_VERSION, &device, &supportedLevel, &context); Instead of checking for individual capabilities (like "does
Feature Levels are closely tied to Shader Models (SM). If a device reports a specific Feature Level, it guarantees support for a corresponding Shader Model version:
The D3D feature level hierarchy is divided into several levels, each representing a set of increasingly advanced features. Here are the most common feature levels:
D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0 ;