Feature levels in Direct3D define strict sets of features required by certain versions of the Direct3D API and runtime, as well as additional optional feature levels available within the same API version.
Feature levels encapsulate hardware-specific capabilities that exist on top of common mandatory requirements and features in a particular version of the API. The levels are grouped in strict supersets of each other, so each higher level includes all features required on every lower level.
Some feature levels include previously optional hardware features which are promoted to a mandatory status with new revisions of the API to better expose newer hardware. More advanced features such as new shader models and rendering stages are only exposed on up-level hardware, however the hardware is not required to support all of these feature levels and the Direct3D runtime will make the necessary translations.
Feature levels allow developers to unify the rendering pipeline and use a single version of the API on both newer and older hardware, taking advantage of performance and usability improvements in the newer runtime.
Separate capabilities exist to indicate support for specific texture operations and resource formats; these are usually specified per each texture format using a combination of capability flags, but some of these optional features are promoted to mandatory on upper feature levels.
Direct3D 10 introduced a fixed set of mandatory requirements for the graphics hardware. Before Direct3D 10, new versions of the API introduced support for new hardware capabilities, however these capabilities were optional and had to be queried with "capability bits" or "caps".
Direct3D 10.1 API was the first to use a concept of "feature levels" to support both Direct3D 10.0 and 10.1 hardware.
In Direct3D 11, the concept of feature levels has been further expanded to run on most downlevel hardware including Direct3D 9 cards with WDDM drivers.
There are seven feature levels provided by D3D_FEATURE_LEVEL
structure; levels 9_1, 9_2 and 9_3 (collectively known as Direct3D 10 Level 9) re-encapsulate various features of popular Direct3D 9 cards conforming to Shader Model 2.0, while levels 10_0, 10_1, 11_0 and 11_1 refer to respective versions of the Direct3D API. "10 Level 9" feature levels contain a subset of the Direct3D 10/11 API and require shaders to be written in HLSL conforming to Shader Model 4.0 4_0_LEVEL_9_x
compiler profiles, and not in the actual "shader assembly" language of Shader Model 1.1/2.0; SM 3.0 (vs_3_0
/ps_3_0
) has been omitted deliberately in Direct3D 10 Level 9.