0
ID3D11Device* md3dDevice;
ID3D11DeviceContext* md3dImmediateContext;
D3D_DRIVER_TYPE md3dDriverType = D3D_DRIVER_TYPE_HARDWARE;
HRESULT hr = D3D11CreateDevice(
            0,                 
            md3dDriverType,
            0,                 
            D3D11_CREATE_DEVICE_DEBUG, 
            0, 0,              
            D3D11_SDK_VERSION,
            &md3dDevice,
            &featureLevel,
            &md3dImmediateContext);ID3D11Device* md3dDevice;

I am getting an e_fail from this function when I include the D3D11_CREATE_DEVICE_DEBUG flag (works fine without flag). I assumed this had something to do with my debug runtime so I reinstalled the dx sdk as per the instructions in this thread: What can cause D3D11CreateDevice() to fail with E_FAIL? It did not solve the problem though.

I am also still seeing zero debug levels in dxdiag:

--------------------
DirectX Debug Levels
--------------------
Direct3D:    0/4 (retail)
DirectDraw:  0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay:  0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow:  0/6 (retail)

Any help would be appreciated.

Community
  • 1
  • 1
r m
  • 177
  • 13

1 Answers1

3

The thread you linked by "What can cause D3D11CreateDevice() to fail with E_FAIL?" does contain the answer to your question I think.

I quote Chuck Walbourn:

The latest version of the SDK Debug Layer is not in the legacy DirectX SDK (June 2010) release. You need to install the standalone Windows 8.0 SDK, Visual Studio 2012, or you can just install the VS 2012 Remote Debugging Tools package.

http://blogs.msdn.com/b/chuckw/archive/2013/02/26/directx-11-1-and-windows-7-update.aspx

For me installing the VS 2012 Remote Debugging Tools package solved the problem!

Community
  • 1
  • 1
yau
  • 537
  • 6
  • 14