# D3D12 device not supported

In the last days, I tried to learn the basics of Direct3D12, using some online resources and tutorials/demos.

After failing to run the demos, I created a new project in Visual Studio 2015, added the necessary configurations and tried to get the basic initialization done. However, running that project, it fails at the same location, which is D3D12CreateDevice() (builds without any warnings/errors).

The return value I keep receiving is DXGI_NOT_SUPPORTED. I changed my code to enumerate through all adapters of the DXGIFactory, which ended up with the same result (the same applies to the warp adapter).

This is the part of the device creation:

bool created = false;

UINT i = 0;
HRESULT hr = S_OK;
{
if (SUCCEEDED((hr = D3D12CreateDevice(pAdapter.Get(), D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&m_device)))))
{
created = true;
break;
}
}
if (!created)
{

CHK((hr = D3D12CreateDevice(
D3D_FEATURE_LEVEL_11_0,
IID_PPV_ARGS(&m_device)
)));
}


My system is running on Windows 10, 64 bit and has integrated Intel HD Graphics, as well as a NVIDIA GeForce GT540M, using the Optimus Technology. I did make appropriate changes to the NVIDIA Control Panel, to make the program run on the GeForce 540M, which - according to the Control Panel - supports the DX12 Runtime and feature level 11.0.
The integrated card however, only supports DX11. According GPU-Z, the Intel card only supports DX10 and the GeForce DX11.

I did install all the latest Windows Updates and drivers for both cards.
My guess is, that this is a driver related problem, since I am not able to run the demos either.

Can this be any issue related to the program itself, or should I try to get help from NVIDIA(or Microsoft?) about this problem?

It looks like Optimus is up to no good again. As long as you render to the screen connected to Intel HD, it simply would not go away, despite any changes made in control panel or device manager, or bios.

Optimus tech is designed in a way that screen connected to Intel HD is always linked to the framebuffer of Intel HD card. 'Real' NVidia GPU is only allowed to write memory pages directly into that framebuffer. When you change that Control Panel setting, you only allow or disallow these GPU writes, you do not toggle direct rendering to a screen like one would think.

So your Nvidia GPU cannot directly render to an Intel HD connected display. What should you do? I don't really know, no Optimus in my home now and never will be; theoretically your troubles should go away if you connect your primary display to the Nvidia card, bypassing Intel HD completely.

• Thanks for the replay. This does not sound very promising. As for bypassing the Intel HD, that will be a rather difficult task, as I only have a Laptop. – user000user Aug 2 '15 at 22:24

After a lot of research, I finally found the reason for this. Apparently, Fermi-based GPUs do not support DirectX12 yet.
"[They] will gain support for DirectX 12 ... later this year".

Hopefully, this won't take too long.

• In the meantime, use WARP... – Chuck Walbourn Aug 4 '15 at 0:44
• @ChuckWalbourn As I mentioned in my question already, the WARP device does not seem to work either. – user000user Aug 4 '15 at 7:17
• Does it work if you don't first attempt to create a hardware device? – Chuck Walbourn Aug 4 '15 at 7:26
• Tried that, but still not working. – user000user Aug 4 '15 at 7:46