I’m wondering if theres some way to see how long an OpenGL drawing command takes without stalling the CPU with a glFinish or an NV_Fence. Something like a callback that gets called by the driver when a drawing command is done…
I have a feeling there isn’t, but I just wanted to post incase I’m missing something. Thanks
One method of using the fence is to poll (TestFence) and that won’t stall the pipeline. It’s not an interrupt driven callback but at least you can get some finer grained info without stalling.
Even this only tests latency to completion though. In a realistic scenario the pipeline is going to be busy before you issue your fence and really all a fence does is tell you when a specific command you issued has been completed. It says nothing about all the crap in the pipeline it had to wait on before it got done. Even if you could sandwitch a call interpretation of the results can be inconclusive.
Performance measurements in a pipeline with numerous FIFOs can be very confusing, so make sure you know what you’re measuring before you draw conclusions.