> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CheckFeatureSupport

> Gets information about the features that are supported by the current graphics driver. (ID3D12Device.CheckFeatureSupport)

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

## Syntax

```cpp theme={null}
HRESULT CheckFeatureSupport(
    D3D12_FEATURE Feature,
    void  pFeatureSupportData,
    UINT FeatureSupportDataSize
)
```

### Parameters

*Feature*\
Type: D3D12\_FEATURE

A constant from the [D3D12\_FEATURE](https://docs.xbox.com/reference/graphics/d3d12/enums/d3d12_feature_public.md) enumeration describing the feature(s) that you want to query for support.

*pFeatureSupportData \[in, out]*\
Type: void \*

A pointer to a data structure that corresponds to the value of the *Feature* parameter. To determine the corresponding data structure for each constant, see [D3D12\_FEATURE](https://docs.xbox.com/reference/graphics/d3d12/enums/d3d12_feature_public.md).

*FeatureSupportDataSize*\
Type: UINT

The size of the structure pointed to by the *pFeatureSupportData* parameter.

### Return value

Type: HRESULT

Returns **S\_OK** if successful. Returns **E\_INVALIDARG** if an unsupported data type is passed to the *pFeatureSupportData* parameter or if a size mismatch is detected for the *FeatureSupportDataSize* parameter.

## Remarks

As a usage example, to check for ray tracing support, specify the [D3D12\_FEATURE\_DATA\_D3D12\_OPTIONS5](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_feature_data_d3d12_options5_public.md) structure in the *pFeatureSupportData* parameter. When the function completes successfully, access the *RaytracingTier* field (which specifies the supported ray tracing tier) of the now-populated **D3D12\_FEATURE\_DATA\_D3D12\_OPTIONS5** structure.

For more info, see [Capability Querying](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/capability-querying).

Hardware support for DXGI Formats
To view tables of DXGI formats and hardware features, refer to:

<ul>
  <li>
    [DXGI Format  Support for Direct3D Feature Level 12.1 Hardware](https://learn.microsoft.com/en-us/windows/desktop/direct3ddxgi/hardware-support-for-direct3d-12-1-formats)
  </li>

  <li>
    [DXGI Format  Support for Direct3D Feature Level 12.0 Hardware](https://learn.microsoft.com/en-us/windows/desktop/direct3ddxgi/hardware-support-for-direct3d-12-0-formats)
  </li>

  <li>
    [DXGI Format  Support for Direct3D Feature Level 11.1 Hardware](https://learn.microsoft.com/en-us/windows/desktop/direct3ddxgi/format-support-for-direct3d-11-1-feature-level-hardware)
  </li>

  <li>
    [DXGI Format  Support for Direct3D Feature Level 11.0 Hardware](https://learn.microsoft.com/en-us/windows/desktop/direct3ddxgi/format-support-for-direct3d-11-0-feature-level-hardware)
  </li>

  <li>
    [Hardware Support for Direct3D 10Level9 Formats](https://learn.microsoft.com/en-us/previous-versions/ff471324\(v=vs.85\))
  </li>

  <li>
    [Format Support for Direct3D Feature Level 10.1 Hardware](https://learn.microsoft.com/en-us/windows/desktop/direct3ddxgi/format-support-for-direct3d-feature-level-10-1-hardware)
  </li>

  <li>
    [Format Support for Direct3D Feature Level 10.0 Hardware](https://learn.microsoft.com/en-us/windows/desktop/direct3ddxgi/format-support-for-direct3d-feature-level-10-0-hardware)
  </li>
</ul>

#### Examples

The [D3D1211on12](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/working-samples) sample uses **ID3D12Device::CheckFeatureSupport** as follows:

```cpp theme={null}
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\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Device](https://docs.xbox.com/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device.md)


## Related topics

- [D3D12_FEATURE](https://docs.xbox.com/reference/graphics/d3d12/enums/d3d12_feature_public.md)
- [D3D12_FEATURE_DATA_SHADER_CACHE](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_feature_data_shader_cache_public.md)
- [D3D12_FEATURE_DATA_SHADER_MODEL](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_feature_data_shader_model_public.md)
- [D3D12_FEATURE_DATA_D3D12_OPTIONS2](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_feature_data_d3d12_options2_public.md)
- [D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY](https://docs.xbox.com/reference/graphics/d3d12/structs/d3d12_feature_data_command_queue_priority_public.md)
