![]() ![]() This is considered to be a good balance between responsiveness and keeping the pipeline flowing to ensure a high framerate - the more buffering in the system, the less the GPU and CPU have to wait for each other. So DirectX puts a limit of the CPU getting at most two frames ahead of the GPU (in practice because of the way screen updates are handled, the time to when you actually see the image on your screen might be three frames). So you move the mouse left, and seconds later your view actually goes left. You could let this happen indefinitely, but then your CPU is generating data that won't be rendered and displayed for seconds - or even minutes. But what if the CPU only takes 10ms to generate the data for those frames? Obviously you can put some buffering in there to ensure smooth progress (and DirectX does this for you, unless you break it), but at some point the CPU is going to have a lot of frames queued up and the GPU can't finish them fast enough. Let's say the GPU is managing to render a frame every 30ms. 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. 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. The reason you're seeing Present on your profile is that Present is also when the CPU and GPU "sync up" with each other. ![]() It might also do a few blits and clears, but those are very quick operations on today's cards. 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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |