ID3D12Device::CheckFeatureSupport method

Gets information about the features that are supported by the current graphics driver.

Syntax


HRESULT CheckFeatureSupport(
            D3D12_FEATURE Feature,
  [in, out] void          *pFeatureSupportData,
            UINT          FeatureSupportDataSize
);

Parameters

Feature

Type: D3D12_FEATURE

A D3D12_FEATURE-typed value that describes the feature to query for support.

pFeatureSupportData [in, out]

Type: void*

The passed structure is filled with data that describes the feature support. To see the structure types, see the Remarks section in D3D12_FEATURE enumeration.

FeatureSupportDataSize

Type: UINT

The size of the structure passed to the pFeatureSupportData parameter.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns E_INVALIDARG if an unsupported data type is passed to the pFeatureSupportData parameter or a size mismatch is detected for the FeatureSupportDataSize parameter.

Remarks

Refer to Capability Querying.

Hardware support for DXGI Formats

To view tables of DXGI formats and hardware features, refer to:

Examples

The D3D1211on12 sample uses ID3D12Device::CheckFeatureSupport as follows:


inline UINT8 D3D12GetFormatPlaneCount(
    _In_ ID3D12Device* pDevice,
    DXGI_FORMAT Format
    )
{
    D3D12_FEATURE_DATA_FORMAT_INFO formatInfo = {Format};
    if (FAILED(pDevice->CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO, &formatInfo, sizeof(formatInfo))))
    {
        return 0;
    }
    return formatInfo.PlaneCount;
}


Requirements

Header

D3D12.h

Library

D3D12.lib

DLL

D3D12.dll

See also

ID3D12Device

 

 

Show: