[SOLVED]2.1 D3D11 error?

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

[SOLVED]2.1 D3D11 error?

Post by drwbns »

Is anyone else having trouble using the d3d11 plugin? As soon as I uncomment it in plugins_d.cfg, I get the Ogre.log error -

Code: Select all

OGRE EXCEPTION(-2147024809:RenderingAPIException): Failed to create Direct3D11 device in D3D11RenderSystem::D3D11RenderSystem at D:\Graphics Code\2-1\RenderSystems\Direct3D11\src\OgreD3D11RenderSystem.cpp (line 287)
I can use OpenGL3+ just fine. I'm using lastest revision of 2.1 (88c570bde187371fa2d2536d37767cb7193c5b9a)
Last edited by drwbns on Wed Jun 10, 2015 7:21 am, edited 1 time in total.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: 2.1 D3D11 error?

Post by dark_sylinc »

Working fine here. Debug & Release modes? (it may run when running on Release mode).

Does this happen before you get to the config dialog, or after you've selected the D3D11 plugin and hit ok?

If it's the former, I'll be quite interested in your system setup (number of GPUs, enumerated DXGI devices: use C:\Program Files (x86)\Windows Kits\8.1\bin\x64\dxcapsviewer.exe to see the DXGI devices in your system; DxDiag logs).

Edit: Also you could have outdated DX11 runtimes, or some screw up in your SDK installation. Does this set of precompiled bins work for you when you try them?

Edit 2: I just checked the docs, the error code corresponds to E_INVALIDARG. Could you also include the contents of all the arguments passed to D3D11CreateDeviceN before it fails?
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: 2.1 D3D11 error?

Post by drwbns »

I'll check those items when I get off work today. Thanks
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: 2.1 D3D11 error?

Post by drwbns »

It's happens before the config dialog. Pre-compiled binaries also don't work with the same error - Both debug and release fail with same error.

Code: Select all

---------------------------
An exception has occured!
---------------------------
OGRE EXCEPTION(-2147024809:RenderingAPIException): Failed to create Direct3D11 device in D3D11RenderSystem::D3D11RenderSystem at G:/SDK/Ogre2-Hlms-Private/RenderSystems/Direct3D11/src/OgreD3D11RenderSystem.cpp (line 301)
---------------------------
OK   
---------------------------
The only oddity is that d3dcompiler_47.dll was not found so I added that to the working directory and then I got the error above. I'm assuming that these warnings have something to do with it when building OgreMain.lib -

Code: Select all

5>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(29): warning C4005: 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT': macro redefinition (compiling source file D:\Graphics Code\2-1\RenderSystems\Direct3D11\src\OgreD3D11GpuProgram.cpp)
5>  C:\Program Files (x86)\Windows Kits\8.1\Include\shared\winerror.h(50235): note: see previous definition of 'DXGI_ERROR_FRAME_STATISTICS_DISJOINT' (compiling source file D:\Graphics Code\2-1\RenderSystems\Direct3D11\src\OgreD3D11GpuProgram.cpp)
5>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(30): warning C4005: 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE': macro redefinition (compiling source file D:\Graphics Code\2-1\RenderSystems\Direct3D11\src\OgreD3D11GpuProgram.cpp)
5>  C:\Program Files (x86)\Windows Kits\8.1\Include\shared\winerror.h(50244): note: see previous definition of 'DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE' (compiling source file D:\Graphics Code\2-1\RenderSystems\Direct3D11\src\OgreD3D11GpuProgram.cpp)
5>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(31): warning C4005: 'DXGI_ERROR_DRIVER_INTERNAL_ERROR': macro redefinition (compiling source file D:\Graphics Code\2-1\RenderSystems\Direct3D11\src\OgreD3D11GpuProgram.cpp)
5>  C:\Program Files (x86)\Windows Kits\8.1\Include\shared\winerror.h(50254): note: see previous definition of 'DXGI_ERROR_DRIVER_INTERNAL_ERROR' (compiling source file D:\Graphics Code\2-1\RenderSystems\Direct3D11\src\OgreD3D11GpuProgram.cpp)
5>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(32): warning C4005: 'DXGI_ERROR_NONEXCLUSIVE': macro redefinition (compiling source file D:\Graphics Code\2-1\RenderSystems\Direct3D11\src\OgreD3D11GpuProgram.cpp)
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: 2.1 D3D11 error?

Post by dark_sylinc »

If my precompiled binaries don't work for you, then you have a pretty weird setup.

I would like to know more about your hardware. Print whole tree to file the specs from the caps viewer (C:\Program Files (x86)\Windows Kits\8.1\bin\x64\dxcapsviewer.exe; the file is saved in the Desktop as dxview.log), and send me a DxDiag.txt log.

Also if you can debug the values of the arguments of D3D11CreateDeviceN right before it fails; it would be great!
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: 2.1 D3D11 error?

Post by drwbns »

Ok, thanks for the help Matias. The problem I see with trying to get the debug values is that the debugger never gets to the createDevice call from what I can tell, or at least I can't see the values somehow. Visual Studio complains that the breakpoint will never be reached at the D3D11CreateDeviceN function. Callstack is below, logs are in archive ( too big to attach directly )
d3d11-crash.png
Desktop.rar
dxdiag.log,dxview.log
(19.14 KiB) Downloaded 52 times
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: 2.1 D3D11 error?

Post by dark_sylinc »

I can't see anything weird in your machine's setup, except perhaps that there should be an Intel HD 3000 GPU not being enumerated that is missing and ought to be there.
drwbns wrote:The problem I see with trying to get the debug values is that the debugger never gets to the createDevice call from what I can tell, or at least I can't see the values somehow. Visual Studio complains that the breakpoint will never be reached at the
That's because the source file was slightly modified, or the PDB or DLL didn't match with the version of the source code you're trying. Rebuild and debug again.
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: 2.1 D3D11 error?

Post by drwbns »

hmmm. I did a full rebuild and ended in the same exact state. Can't see debug values. I didn't modify anything so I'm not sure what to do next. Are all the DX warnings ok?
lhp1997
Gnoblar
Posts: 2
Joined: Thu Jan 23, 2014 3:46 am

Re: 2.1 D3D11 error?

Post by lhp1997 »

If your OS is win7,you need put a "KB2670838" patch.
Try it!
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: 2.1 D3D11 error?

Post by drwbns »

I'll look into that when I get off work. Thanks.
drwbns
Orc Shaman
Posts: 788
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: 2.1 D3D11 error?

Post by drwbns »

lhp1997 wrote:If your OS is win7,you need put a "KB2670838" patch.
Try it!
Wow. This actually worked! Thank you. How did I miss this patch? I've been doing a little reading but I'm still not sure if it was optional or automatic. Thank you either way. The only negative thing is I still can't set a proper breakpoint for the createDevice function. I'll try a Visual Studio repair and post back the results.
Post Reply