is there any way with our favorite graphic library to Precisely! get the info for GPU idle?? i’ve tried glFlush() but it seems to disturb rendering process!! )
Anyway, is there anything specific on GeForce boards that can do that job??
Any register?? )))
Please send a postcard!
I’m not sure I understand either the question or the motivation behind the question…
Any non-zombie answer?
I’m serious, I don’t understand the question.
ok matt, all i need is an information which says when the end of rendering really occurs (before flipping backbuffer) to get something like GPU occupancy percentage. Thus, i was thinking to use glFlush to force the end of the rendering but of course it disturbs the glswap() certainly becoz of vertical retrace & swap considerations…
(in fact, i am really not sure about the glFlush behavior, is it really blocky??)
blah blah blah in fact, i simply need a flag which says heeeyoooh Oz!! rendering is done!
the reason: i just want to get a nice rastertime bar for my cpu (this works) and another bar for the gpu (almost) oh my god! what am i doing!!
glFinish has to wait for all the rendering to be done.
glflush simply starts all the commands that were pending. It is only usefull if you use opengl over a Network.
It’s misleading to talk about some percentage of frame time being used by the CPU and some percentage being used by the GPU. The ideal app, in fact, is one that uses 100% of the CPU cycles and 100% of the GPU cycles.
You can use the NV_fence extension to do limited forms of HW timing, but I’ll warn you that it’s very limited.
Note that glFlush is useful. It is required for front-buffered rendering.
> The ideal app, in fact, is one that uses 100% of the CPU cycles and 100% of the GPU cycles.
On this topic, are there any trick(s) to keep the GPU busy ?
For example, say my pipeline is:
1- Clear buffers, sets initial states ( GPU work ),
2- Compute visibility determination for current frame ( CPU work ),
3- Sort visible geometry by states ( CPU work ),
4- Send geometry to hardware ( GPU work ),
5- Process IA/inputs ( CPU work ),
6- Flip image ( GPU work ).
7- Loop to 1
Would it be better to put all the CPU work after the flip ( after step 6 ) ? Or all between 4 and 6 ? Or something else ? In theory what is the best pipeline ?
For example, is this one better, as i suspect ?:
1- Compute visibility for first frame ( CPU work ),
2- Clear buffers, set initial states ( GPU work ),
3- Send geometry to hardware ( GPU work ),
4- Computer visibility determination for next frame ( CPU work ),
5- Sort visible geometry by states ( CPU work ),
6- Process IA/inputs ( CPU work ),
7- Flip image ( GPU work ),
8- Goto 2.