Jump to content
  • Advertisement
Sign in to follow this  
ChenA

DX11 Present() use too much time

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

recently, i profile my game use the gpu query.

i use the method from mjp's blog.

everything is fine, except that the present() use too much time, 6-10ms.

even my game is gpu bound, this is too much, i don't use vsync.

why present() use so much time?

Thanks.

Share this post


Link to post
Share on other sites
Advertisement

Why is present so slow?

Quote

Well - it isn't! On its own, Present does very little except tell the GPU that the current frame is done, and it should display that to the screen. It might also do a few blits and clears, but those are very quick operations on today's cards.

The reason you're seeing Present on your profile is that Present is also when the CPU and GPU "sync up" with each other. They are two separate units operating asynchronously in parallel (well, ideally :-), and you need to be aware that at certain times, one may need to wait for the other. Obviously the GPU can't get ahead of the CPU (because the CPU generates commands for the GPU), but it is fairly easy to give the GPU so much work to do that you can generate rendering commands with the CPU faster than the GPU can complete those commands.

Read the rest of the post linked above for more info.  It's really good stuff that might seem non-obvious sometimes.

Share this post


Link to post
Share on other sites
18 minutes ago, mhagain said:

Why is present so slow?

Read the rest of the post linked above for more info.  It's really good stuff that might seem non-obvious sometimes.

thanks for your reply.

in your reference article, the present() use too much time is because that it's cpu time.

the cpu wait gpu when application is gpu bound.

i profile the gpu time, not the cpu time, it's not a same question.

 

Just now, Hodgman said:

How much GPU time do you use per frame?

about 40ms.

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!