Jump to content
  • Advertisement
Sign in to follow this  
Pyrogame

DX11 DX11 - SlimDX - c# Debugging

This topic is 3031 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to know, how I can debug my DX application. Everybody said, that we should use PIX or something like that. But I have problems with this. What I have tried: - Compiling SlimDX with Debug-Target, then used this Debug-DLLs - In my own project set the Debug-Target - In my own projects settings enabled the debugging of native code - Set the x86 target and used the x86-SlimDX DLL version - dxcpl: On the DX11-Tab, list edit and add the executable of my project, also tried to add the whole bin directory - Run PIX, pointed to my executable, start it The program starts, I see my logging messages, then the DX-window apears, which contains some PIX-Output in it, but then my program crashes. In the Log there is this exception: Frame 000002 ........PRE: <this=0x05f19628>ID3D11Device::GetImmediateContext(NULL) An unhandled exception occurred. Maybe PIX does not support multithreaded rendering? ^^ Do I miss something to set? I hope, you can help.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

It's a known issue in the latest SDK which happens when D3D11CreateDevice is called with a NULL ppImmediateContext value, which is exactly what SlimDX is doing.

More info here under 'Known Issues with the February 2010 SDK' and it should be solved with the next release.

Quote:

PIX Crashes on Call to GetImmediateContext

In the February 2010 release, PIX crashes if the target application calls D3D11CreateDevice() or D3D11CreateDeviceAndSwapChain() with a NULL ppImmediateContext, then later calls GetImmediateContext() to get the immediate context. To work around the issue, pass a non-NULL pointer for ppImmediateContext. This issue will be corrected in an upcoming release.


Meanwhile, I've managed to work around this error doing exactly what they suggest on MSDN: I've edited SlimDX Device11 constructor void Device::Initialize in Device11.cpp so it passes a ID3D11DeviceContext *dc = NULL; to D3D11CreateDevice and then after recompiling SlimDX PIX works as expected :)

Yeah it's temporary but better than nothing IMO. Good luck!

Share this post


Link to post
Share on other sites
Cool, that was the problem. I've changed the call in the init method, recompiled slimdx and now I'm able to run PIX with my program.

Thank you for your help :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!