Jump to content
  • Advertisement
Sign in to follow this  
Living

present & not complete draw

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

Hello everyone! I have some problem with drawing my primitive. Most of times, our engine runs well. In the release mode, all the primitives is drawn between 5 to 10 microsecond. But sometimes, it draw a primitive with thousands of microseconds, even ten thousand second. I writed a log file to note about the primitives which taked too long to be drawn. I found two problem. One is that these primitives are not fixed, the second is that these primitives drawn normally in most of frames. Do you have these problem ever? If one frame, there is a primitive take too much time to be drawn, will the present() wait it, or will the present() take too much time for this?

Share this post


Link to post
Share on other sites
Advertisement
You can't measure the CPU time taken to make D3D calls and expect it to mean anything useful - the CPU and GPU run asynchronously, so timing one call doesn't really mean anything.

You can use a GPU profiler like NVPerfHUD, or time entire frames (And even then, remember that the GPU can be rendering a few frames behind the CPU).

Present() will wait for all pending data to be drawn before presenting the backbuffer.

Share this post


Link to post
Share on other sites
Thank you!

I wrote two functions between DrawIndexedPrimitive(). These two function mark the time in microsecond. Could I use this way to detect the time about DrawIndexedPrimitive()?

Now I used this way to detect the time. First, I fixed a camera to make sure the scene did not have any changes. I found that every frame my game draw 564 meshes. Most of times every mesh take about 5 microsecond. But some meshes take thousands of microsecond sometimes. When this case comes is unsure, which mesh will come out this case is unsure, how many meshes will be is unsure......It just like everything is unsure. So I can't fix the problem.

If many meshes come out this case in a frame, this frame will take too much time. And the game can not run fluency.

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!