ID3D11Device::CheckMultisampleQualityLevels method (d3d11.h)

Get the number of quality levels available during multisampling.


HRESULT CheckMultisampleQualityLevels(
  [in]  DXGI_FORMAT Format,
  [in]  UINT        SampleCount,
  [out] UINT        *pNumQualityLevels


[in] Format


The texture format. See DXGI_FORMAT.

[in] SampleCount

Type: UINT

The number of samples during multisampling.

[out] pNumQualityLevels

Type: UINT*

Number of quality levels supported by the adapter. See Remarks.

Return value


This method returns one of the following Direct3D 11 Return Codes.


When multisampling a texture, the number of quality levels available for an adapter is dependent on the texture format used and the number of samples requested. The maximum number of quality levels is defined by D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT in D3D11.h. If this method returns 0 (S_OK), and the output parameter pNumQualityLevels receives a positive value, then the format and sample count combination is supported for the device. When the combination is not supported, this method returns a failure HRESULT code (that is, a negative integer), or sets pNumQualityLevels output parameter to zero, or both.

Furthermore, the definition of a quality level is left to each hardware vendor to define; however no facility is provided by Direct3D to help discover this information.

Note that FEATURE_LEVEL_10_1 devices are required to support 4x MSAA for all render targets except R32G32B32A32 and R32G32B32. FEATURE_LEVEL_11_0 devices are required to support 4x MSAA for all render target formats, and 8x MSAA for all render target formats except R32G32B32A32 formats.


Target Platform Windows
Header d3d11.h
Library D3D11.lib

See also