Sign in to follow this  
Endar

No D3DX debug output when D3DXCreateEffectFromFile fails

Recommended Posts

Endar    668
I can't seem to get any D3DX debug output. I've googled and searched, and tried and failed.
[list][*]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).[/list]
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 [url="http://msdn.microsoft.com/en-us/library/bb172768(VS.85).aspx"]MSDN docs[/url] 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
Texus    248
I don't know anything about this, but if you google "D3DXCreateEffectFromFile E_FAIL" then you immediately find 2 topics about this.
I haven't really read all the posts, but you should look to the end of the second topic, it looks interesting.
I hope it will solve your problem too.

[url="http://www.gamedev.net/topic/214180-e_fail-when-running-d3dxcreateeffectfromfile/"]http://www.gamedev.n...effectfromfile/[/url]

[url="http://www.gamedev.net/topic/458588-d3dxcreateeffectfromfile-problems-solved/"]http://www.gamedev.n...roblems-solved/[/url]

Share this post


Link to post
Share on other sites
Endar    668
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this