[osg-users] Rendering performance issues

Alf Inge Iversen alf-inge at autosim.no
Fri Jul 18 08:54:48 PDT 2008

Bob Balfour wrote: 

> Why is the GPU now being delayed so much after 
> Draw?? It's almost like the GPU is stuck starting out there mid-frame?

We are dealing with a problem that looks like a closely related problem. Though we would prefer a kind of delay after draw:

Our application is a real-time visualization process, and constant frame rate at 60 Hz is an absolute necessity. Most of the time the load is not not bigger than 60 Hz should be well maintained, but we still observe severe glitches in the visualiation, especially when running a mirror view as a second channel embedded in the main channel.

Closer investigation (by visually observing the OSG stats, together with printouts to the console window to detect lost real-tme position data) shows that even if no datasets are missing and the computing time is well inside the available time slot, glitches occur. When observing the stats, we realized that the execution of the GPU happen to be performed sometimes within the current frame (see attached image GPU-early.jpg), sometimes in the next frame (see GPU-late.jpg). We could not identify why the execution of the GPU is sometimes postponed. As you see from the images that even when the load is minimal, the GPU may be postponed. We observed significant glitches in the visualization at the moments the execution shifted from one frame to the other or vice versa.

Some latency can be accepted, so to ensure a stable image, it should be possible to lock the start of the GPU processing to the vertical sync. It would then process on data delivered from the Draw of last frame. This would give a stable image, in addition to increase the available time for the processing (full 16 ms for Update, Cull and Draw, and another full 16 ms for the GPU).

Is there a way to control the execution start time of the GPU from the application?

-Alf Inge

Mr. Alf Inge Iversen, VP Engineering
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GPU-early.JPG
Type: image/jpeg
Size: 30323 bytes
Desc: GPU-early.JPG
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080718/d0b82a89/attachment-0006.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GPU-late.JPG
Type: image/jpeg
Size: 29191 bytes
Desc: GPU-late.JPG
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080718/d0b82a89/attachment-0007.jpeg>

More information about the osg-users mailing list