I have a DX11 application to which I would like to add support for software rendering. This is because in some circumstances it will be run on machines without GPUs. From the research I have done, it seems like my best bet is WARP.
It was surprisingly simple to change the app to use WARP:
hr = D3D11CreateDevice(
NULL,
D3D_DRIVER_TYPE_WARP, // was D3D_DRIVER_TYPE_HARDWARE
NULL,
creationFlag,
featureLevels,
ARRAYSIZE(featureLevels),
D3D11_SDK_VERSION,
&mDevice,
&mFeatureLevel,
&mDeviceContext
);
It runs nicely. Where I'm struggling is determining when to set the DriverType to WARP instead of hardware. Is there a function I can call that will tell me if hardware support is available on the system?
I'm using DX 11 feature level 9_1.