cpu and gpu

Started by
2 comments, last by Namethatnobodyelsetook 17 years, 11 months ago
a render loop as below: do cpu thing(set renderstate .do game logical....) do gpu thing(submit a draw call) so assume cpu thing are done very quick. when gpu thing have not been done ,will the next cpu thing be execute? or cpu will stall till gpu done? I think cpu and gpu can run synchronization. so I guess real flow as fellow: do cpu thing ,at the same time ,do last gpu thing do gpu thing ,at the same time , do next cpu thing but this way, many many undone work push in gpu, and cpu has already quickly done many thing. I think I make a mistake. please correct me.
Advertisement
The GPU can buffer upto the 3 frames of commands (I don't remeber if it's based on EndScene or Present). The CPU will stall when the limit is reached.
Quote:Original post by Namethatnobodyelsetook
The GPU can buffer upto the 3 frames of commands (I don't remeber if it's based on EndScene or Present). The CPU will stall when the limit is reached.


where is good links or article about that if you have some good stuffs. thanks
nVidia, and ATI have tons of great info. Dig into their older (2000, 2001, etc.) documents to find some good general info. Most recent presentations focus on specific techniques or features in the latest GPUs.

The 3 frame buffering thing is a requirement of WHQL drivers (Windows Hardware Quality Labs). This helps ensure your display isn't completely out of sync with your app. Imagine you have a simple display, but VSync enabled. Because it's simple, the card can buffer, say, 60 frames of data. Your app will quickly buffer 60 frames. Now if the user clicks a button, or moves their character, or whatever, you'll draw the response to that input. The user will see it after the other 60 buffered frames, roughly a second later. The 3 frame limit ensures the app and display are fairly well in sync.

This topic is closed to new replies.

Advertisement