Jump to content
  • Advertisement
Sign in to follow this  

This topic is 3648 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'm getting some odd results in my program so I thought I would give a profiler a try. I downloaded VTune and in the percentage of process calls to D3DX9_37.dll were 46% of the time taking when running the program. Calls to the actual exe where only just a bit under 18%. I've never profiled before so I don't know if this is a common thing or is there something hidden in my program that is doing this.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by stupid_programmer
I've never profiled before so I don't know if this is a common thing or is there something hidden in my program that is doing this.


Well are you using D3D? Are you doing a lot of drawing with D3D? If yes, then whats the mystery?

Is your question rather "why are D3D calls taking so long"?

Also it is not possible for us to ascertain what values are reasonable unless we know what your app does.

Share this post


Link to post
Share on other sites
VTune will only monitor CPU usage. If the CPU has to wait for the GPU to do something, then you'll see a lot of time spent in drivers and D3D DLLs. To profile the 3D portion of your app, you'll need to use something like NVPerfHUD, or ATI's equivalent (I forget the name).

Ideally, you should profile the CPU usage with rendering disabled, so you don't get bad results.

Share this post


Link to post
Share on other sites
Originally it was spending the most time in D3DXOptimizeVertices(). Not sure if I'm not running it right but a lot of times VTune will quit without me doing anything. Running it without rendering a couple of function calls inside Newton seem to be taking the most time. But that is around 7% and I don't have much going on other then physics updates so that is probably normal. I commented out the rendering and now my game code is taking most of the CPU time so I guess its just waiting on the GPU.

I guess I need to give a little background. I'm working on a game using Newton for physics. All through development I was updating the physics with the time returned from my high resolution timer. This made the game run great on my computer but when I ran it on others the physics were really jerky and erratic. I was told that I should be using a fixed timestep when updating physics. So I set the code to update physics every 60 FPS. This makes the game run bad on my computer now. And lots of other people have been using Newton with no complaints like mine so I know the fault has to be mine. Thought maybe something was bottlenecking the game so I tried the profiler. So I guess I'm back to square one with no decent working physics as I don't know what the problem is.

Share this post


Link to post
Share on other sites
You definitely should not be calling D3DXOptimizeVertices after your loading steps. If you are doing this, then ... don't. ;-) Otherwise, if you are only doing this in you loading step, you probably have vtune profiling your loading time, rather than the actual in-game run-time. VTune has configuration settings for starting after a certain amount of time, and running for a certain amount of time past this. This should allow you to profile your actual runtime code.

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!