Recommended Posts

Hello,
So I'm stumped. PIX seems to work on one application (which is non-full screen) and doesn't seem to work on another one (which is also non-full screen).
I'm sorry if this has been asked before (I couldn't find it while searching), but can anyone tell me under what conditions PIX wont work?
By "not working" I mean PIX runs the application just fine, but there is no HUD output and after the application quits, PIX doesn't show the log from the run in the GUI. When I click exit, it doesn't ask me to save the run file (which probably means it didn't record the run in the first place).
Any help/hints would be appreciated.

Share this post

Link to post

Share on other sites

What are the two applications? Both ones you've written/built? If not, what's different? Do they use different frameworks (e.g. DXUT vs custom)?

Which SDK are you using and under which OS? PIX is an area of active development and changes fairly regularly - in these situations it helps to try it against the latest-n-greatest (e.g. April '07 SDK) to see if it was a problem with an earlier version...

The last incompatability I remember reading about was 32bit/64bit, but i'm pretty sure that was fixed in a recent release...

hthJack

0

Share this post

Link to post

Share on other sites

I have found that PIX won't do its thing if the application you are testing doesn't clean up D3D resources correctly. If you have D3D in debug mode then the application will crash with unfreed resources lying around.

Share this post

Link to post

Share on other sites

Original post by sirobPIX doesn't handle any application that uses LoadLib to link with D3D. If you want to be able to use PIX, you need to specifically link against d3d9.lib in the project properties.

I am not sure if this is still true. At least for Direct3D 10 it works with dynamic loaded libraries, too.

0

Share this post

Link to post

Share on other sites

Original post by sirobPIX doesn't handle any application that uses LoadLib to link with D3D. If you want to be able to use PIX, you need to specifically link against d3d9.lib in the project properties.

If you're trying to hook PIX up to a commercial game, it probably won't work - commercial games usually use LoadLib to link to D3D, so they can provide custom error messages on failure.

Hope this helps.

Thank you for all the posts (this seems to be an all-stars thread with all the forum gurus).

I think this is the problem. The application I have uses LoadLibrary (it is not a commercial game and I have full source of this application. It calls LoadLibrary and then GetsProcAddress for CreateDevice) to call the functions. I don't think it is a compatibility issue, but maybe I am not freeing up resources also (this will take a bit of time to solve if it is the resources problem)...

While on the same topic, can anyone tell me how PIX really works? Does it instrument the binary and replace function calls with its own? Or does it make the binary link to its own instrumented d3d9 dlls?

Also, I am trying to get information on how to write my own PIX plugin. Any idea where I would find that? I wasn't able to find it in the SDK and will look to see if it is in the DDK.

Thank you,

[EDIT] I found a pixplugin.h file in the SDK's include directory that defines a few structs the plugin has to populate. I wonder if the .PIXPLUGIN extension file is really a dll that Pix LoadLibrary's...

Would appreciate greatly if someone can help me out in writing a very basic plugin that reports some "fake" counters. Why, one might ask. My goal is to use my own application instead of PIX and use plugins provided by hardware manufacturers... In order to do that, I must first find out what is in the .PIXPLUGIN file and see how it is formatted etc.

0

Share this post

Link to post

Share on other sites

Original post by madiyaanWhile on the same topic, can anyone tell me how PIX really works? Does it instrument the binary and replace function calls with its own? Or does it make the binary link to its own instrumented d3d9 dlls?

There's a hooking sample by a previous forum moderator that covers one of the many ways you can hook a D3D device. Muhammad's sample doesn't work with LoadLib either, so it should be quite close to the way PIX actually does it.

Quote:

Original post by Demirug

Quote:

Original post by sirobPIX doesn't handle any application that uses LoadLib to link with D3D. If you want to be able to use PIX, you need to specifically link against d3d9.lib in the project properties.

I am not sure if this is still true. At least for Direct3D 10 it works with dynamic loaded libraries, too.

I use the December 2006 SDK and PIX will not link to applications that use LoadLib. I have a #define in my application that swaps between loadlib and regular linking. I doubt this was changed in later SDKs, maybe D3D10 hooking behaves a bit different.