Jump to content
  • Advertisement
Sign in to follow this  

No D3DX debug output when D3DXCreateEffectFromFile fails

This topic is 2591 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

I can't seem to get any D3DX debug output. I've googled and searched, and tried and failed.
  • I have the June 2010 SDK, which is the latest.
  • I've opened the D3D control panel and turned on Debug Runtimes, and set the max amount of debug output (was already doing this before).
  • I'm linking with d3dx9d.lib (was already doing this before).
  • I've set the project to compile with D3D_DEBUG_INFO.
  • My project does NOT redirect all Output Window output to the Immediate window (this was apparently a possibility).
    But I'm still not getting any d3dx debug output when D3DXCreateEffectFromFile fails or at any other time. I've run the BasicHLSL DX sample, and that certainly gives D3DX debug output, but my project doesn't, and it should, for at least 1 function, the one that fails, right? I don't think I'm using many other D3DX functions at this time.

    I can't figure it out.

    Oh, and the function that was failing, D3DXCreateEffectFromFile was failing because there was a compile error in the effects file. That's fine, I messed up and that's my fault, but the MSDN docs say "If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA, E_OUTOFMEMORY."

    Except that the return value was E_FAIL. And I was of course using the SUCCEEDED and FAILED macros and checking the 3 return values specified in the docs.

    *sigh* I'm getting flashbacks to the 3 days I spent trying to figure out why a PS2 dev kit was crashing on startup. That also turned out to be a problem with the docs.

    Can anyone give me any help with getting D3DX to give me debug output, or helping me understand why D3DXCreateEffectFromFile returns E_FAIL instead of one of the return values specified in the docs?

Share this post

Link to post
Share on other sites
Thanks, I appreciate it, but I'd already come across both of those pages and neither helped.

I do get readable error messages from D3DX in the form of shader compilation error messages through the 'ppCompilationErrors' function argument, and I had code all set to output that inside my engine, but since the docs specified (what I thought were) the correct fail return values, I was only checking for them and thought that something more serious was going on and consequently didn't even think to look for possible shader compilation errors.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!