Hi Tim,

I've also found that in DrawThreadPerContext mode (which should be
advantageous on a multiprocessor with a single GPU), the dynamic barrier
is held until the next swap, because the draw thread is sleeping until
that point. This prevents the update traversal from running again until
the draw thread wakes up. I thought the whole point of
DrawThreadPerContext was to allow the update thread to start running
before the buffers are swapped. I know that some synchronization is
needed, but it is a little weird that it is being supplied by the
dynamic barrier.

I agree. I've recently looked at this too in the hopes of improving threading between OSG and our app in places where they were doing totally independent work. From a high level, I was surprised to see that in DrawThreadPerContext, the renderingTraversals() method didn't return until after swapBuffers. This makes us waste a lot of time - we could start doing work for the next frame between the end of the dynamic draw and the swapBuffers.

Just to say, I'm glad you're looking into this and hopefully you can improve the situation, because with my insufficient level of knowledge of threading I have trouble finding how to improve upon the situation - I can observe the results but don't quite know what to do about it.

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to