Hello,
I'm making some tests planing the use of OSG on a Prism. In the beginning
I'd like to make use of Producer to drive 8 pipes and use hardware
compositors. The test I've already done consist in a multiwindow (actually
4) configuration driven by a single pipe. I've tested in a linux PC box
(Producer 9.9, single thread and thread per camera) as well as in a Prism
pipe (Producer 1.2, thread per camera) and in both I've seen the same
tearing effect between tiles. The tearing is more noticeble as the drawing
process is lighter. In the PC I'm even getting seg faults, with different
traces each time, but usually in a GL extension querying related function
(memory corruption?). Anyway this doesn't matter very much as it's an
older version in this case.
I suppose that this tearing has to do with the fact that little can de
done to assure proper synchronization of the buffer swap in each graphics
context. But I've been reading the Producer 1.2 source to try to
understand why this happens. In the naive case of single thread a frame
consist in: clear, cull, make context active and draw for each render
context, and after that swaping buffers in every context. I guess the
XServer has a queue for each graphics context so you cannot make any
assumption about the order in which the buffers are swaped and whether
there is still pending drawing in any context when a swap occurs in other.
But
1. The buffer swaping is synchronized to display vertical retrace in both
cases (I'm sure about this) and my drawing process takes less than refresh
period to complete.
2. I'm also synching the beginning of the frame to the vertical retrace
So the guess I have is that the drivers (nVidia from the PC and ATI for
the Prism) are not smart enough to swap all contexts at the same time. I
mean, when a context issues a glXSwapBuffers command, and it is synched to
vertical retrace, this swap occurs and the precise moment. But all the
remaining swaps have lost the retrace signal (because of XServer being
single threaded? or better, I only have pipe to fulfill the contexts
requests), and they become staggered, so the faster the draw process is,
the faster you can navigate and the more you notice the tearing. I've just
tried disabling the VSync in the nVidia driver settings and as my frame
rate is over 200 (without AA) there is no noticeable tearing. So maybe the
explanation before is right.
But after all, why on the hell you would like tiling a window with
viewports with different rendering contexts if you only have a pipe.
Actually I'm not asking anything but just want to receive any feedback
about this hypothesis and to know if the real multipipe approach I can
expect right results.
A final question, Producer doesn't make use of SGI swap group extensions,
does it?

Best regards,
Juan

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to