0
\$\begingroup\$

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;
ComPtr<IDXGIAdapter1> pAdapter;
HRESULT hr = S_OK;
while (SUCCEEDED(m_dxgiFactory->EnumAdapters1(i++, pAdapter.ReleaseAndGetAddressOf())))
{
    DXGI_ADAPTER_DESC1 desc = {};
    pAdapter->GetDesc1(&desc);
    if (SUCCEEDED((hr = D3D12CreateDevice(pAdapter.Get(), D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&m_device)))))
    {
        created = true;
        pAdapter.ReleaseAndGetAddressOf();
        break;
    }
}
if (!created)
{
    ComPtr<IDXGIAdapter1> pWarpAdapter;
    CHK(m_dxgiFactory->EnumWarpAdapter(IID_PPV_ARGS(&pWarpAdapter)));

    CHK((hr = D3D12CreateDevice(
        pWarpAdapter.Get(),
        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?

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ 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. \$\endgroup\$ – user000user Aug 2 '15 at 22:24
0
\$\begingroup\$

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.