Direct3D 12: New CD3DX12FeatureSupport class for checking feature support

Started by JeGX, August 11, 2021, 05:18:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JeGX

Quote
Direct3D can perform a lot of different operations. We use "capability" or "cap" to describe what the library can do. Direct3D 12 has a single API, ID3D12Device::CheckFeatureSupport, which tells us whether a cap is supported and its level of support in the runtime environment.

...

To improve your experience with feature checking, we have added a wrapper API with a simpler call routine and more friendly interface. Actually, it's not a single API but an entire class. Allow me to introduce the new "CD3DX12FeatureSupport" class, located in d3dx12.h and available from the DirectX-Headers repo on GitHub.

It's hard to explain why this class is better the original API.

Link:
- https://devblogs.microsoft.com/directx/introducing-a-new-api-for-checking-feature-support-in-direct3d-12/


Code snippet:

CD3DX12FeatureSupport features;
features.Init(device);
BOOL ROVsSupported = features.ROVsSupported();
BOOL WaveOps = features.WaveOps();
D3D12_RAYTRACING_TIER RaytracingTier = features.RaytracingTier();