Jump to content
  • Advertisement
Sign in to follow this  
Grdman

profiling

This topic is 4469 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 jusst ran AMDs profiler CodeAnalyst to se what my app is doing and found out that I am spending 20% of cpu time in a function named ComputeIMTFromPerTexelSignal in the d3dx9_30.dll. Is there anybody out there that know what this funciton does? It is nothing I have called directly. I allso spend about 40% in the nv4_disp.dll and I wonder what it is that take so long. My app does 1000 draw calls (per frame) with the same VB witch I lock and write to the VB after every call. Is there a good place to find information about things like this? About what is goning on in the driver and the DX runtime? If the cpu have to whait for the gpu is this rime spent in a driver waiting or will the OS get the cpu back during this time? If it is spend in the driver (and it seems like that on my result) in what file can I expect to se this time? The nvidia driver or the DX? Thanx for taking the time to read this :-)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Grdman
I allso spend about 40% in the nv4_disp.dll and I wonder what it is that take so long.

My app does 1000 draw calls (per frame) with the same VB witch I lock and write to the VB after every call.
That's what's eating up 40% of your CPU time. nv4_disp.dll is the nVidia display driver. You're flooding it with batches. More than 200-300 batches per frame is A Bad Thing, and will eat up CPU time.

EDIT: More information:
It's far better to lock the VB once, write everything into it, then unlock it. As for analysing what the GPU is doing, PIX is quite good, although I haven't really played with it myself.

No idea about your first question, however.

Share this post


Link to post
Share on other sites
Quote:
Original post by Grdman
I jusst ran AMDs profiler CodeAnalyst to se what my app is doing and found out that I am spending 20% of cpu time in a function named ComputeIMTFromPerTexelSignal in the d3dx9_30.dll.
Is there anybody out there that know what this funciton does? It is nothing I have called directly.

This appears to be UVAtlas related. There are D3DX functions such as D3DXComputeIMTFromTexture() that I bet would call this internally. Are you doing anything like this?

Share this post


Link to post
Share on other sites
Thanks for the reply.

Yes I know that using so many batches kill the cpu. I use geometry instacing in my real app. At the moment I am trying different things just to see what effect it has on the performenc and to learn how to use the profiler.
But if I understad you correctly the overhead time from API calls are spend in the nv4_disp.dll (in my case) and not in the dx.dll file, that is good to know.

How about cpu waiting for gpu time? Where is it spent? And way is that time not avalible for the OS to do something more valueble? (like the waiting process :-)

When I was doing tests I found that ComputeIMTFromPerTexelSignal took 20% of my cpu and was very surprised. I tried to find what this function does but so far I have failed.

No Im not calling D3DXComputeIMTFromTexture() or any other function that I can directly relate to UVAtlas (I dont really know what IMT or UVAtlas is).

I know DX isnt open source and that you arnt suppose to know how anything on the inside works ;-) but if anybody has a good reference or a good book to recomend on how to get a little more knowlage I would be moste greatful. It feels like Im fumbeling in the dark a lot of times trying different setting testing what works best. By this I mean things like nr of API calls, memory pools, when to use DYNAMIC flags, how to get anyting end up in the memory you want, all those things that are just a little beond all the beginners books and tutorials out there.

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!