Jump to content
  • Advertisement
Sign in to follow this  
Alex Red

Can anybody explain me this...?

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

Hi All... This thing I already asked, but got no answer back, and now that it seems more clear to me, I ask again... I am improving a DX7 engine... I got an object in a VB, 522 Vertices, 1 Texture, 2 Renderer States I draw the object once in Indexed mode, and I get a drawing time of about 15 uSec I draw the SAME OBJECT from SAME VB twice, and time rises to about 20 uSec Again, draw it 3 times, time goes to 25 uSec ok... the more I draw, for each draw the time seems to rise of about 5 uSec each Draw + the initial overhead of about 15 uSec... till when I dnt reach a 'limit' ( seems about that number ) of a total of 5000 vertices drawn... then draw time steps suddently of about 300 uSeconds more... then, passed this 'step', again about 5 uSec for each more draw.. Such Rise Step seems to happen every 5000 Vertices of increase... I tested, this has nothing to do with number of Render States or Texture switches, I tried objects with many more Render states and Texture changes, and same behaviour... till I stay under 5000 ( about ) vertices, timings are fine, as I go over that level... time steps up by a nice 300 uSec at least... this happens both on nVidia and ATI Cards... Could any1 tell me if there is a way to avoid this...or what is it? tnx [R]ed

Share this post


Link to post
Share on other sites
Advertisement
I am timing a Profiler made by me in Assembly, it's using processor performance registers, and even if checked with profilers like GlowCode or DevPartner results are the same ( even if they not so accurate and fast )...

Well, refresh time could be smthing to check, even if I dnt believe it could be the cause, the overall timing of a series of draws is about 800uSec, so, very little compared to the VSync of a monitor, but, effectively, the rendering is started every 40mSec synched by a Windows Timer, so may be it 'falls' in the timing area of VSync...
However, this 'Timing Step' seems to happen every about 5000 vertices, so, a very little time btween 1st Step and second, dealing with tenths of uSeconds... not the delay btw 2 VSyncs for sure...

Tnx for the Idea however SuperMat, I'll check...

[R]ed

Share this post


Link to post
Share on other sites
When it comes to timing Direct3D calls I'd really recommend using PIX instead of rolling your own profiler - PIX can hook into the drivers and give you a lot more information about what time is being spent where. There's a set of plugins for PIX from ATI for their cards. On NVidia cards you may also want to look at NVPerfHUD.

Share this post


Link to post
Share on other sites
DX doesn't necessarily actually do any drawing when you call the drawing functions, it might add it to a queue to be dealt with at a later time (like when you lock a buffer or call present).

Share this post


Link to post
Share on other sites
Tnx to all...
However... SuperPig... I am not interested in GPU performances... but CPU ones...
I have to deal with a big ( some Tenths MBs of sources ) big program, so, what is my interest is how much I can save for CPU Time... and I am actually measuring it...
I dnt have hook problems, my profiler is just 4 Assembly instructions to START the measure and STOP it, calculations are later done in dead time...

Infact, if as Dagget said and I suppose, DX is just caching, I wonder why CPU gets stuckked in there when passing such level of 'cached vertices'....

From what I have seen, I start to believe that GPU allocates an it's internal buffer ( may be of indexes ) to draw, and loads it...when u got too much vertices GPU has to allocate another one...not sure, but the timings and behaviour I got seem equal to that of switching btw VBs while drawing...

Howevere tnx for notes on Video Profilers... going to check for them...

[R]ed

[Edited by - Alex Red on August 23, 2005 9:14:29 AM]

Share this post


Link to post
Share on other sites
I'm pretty sure that both PIX and NVPerfHUD give you some information how much time is spent in the driver (i.e. on the CPU) per call.

Share this post


Link to post
Share on other sites
Yep... U r perfectly right Superpig... I thought about it after... sorry...
however... tried to get the NVPerfHUD...
but seem to work only with DX9...
my engine is a DX7... I will seek round the net...
Dunno where to lok for PIX instead..

Tnx Again Mate

[R]ed

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!