|08-15-06, 01:08 PM||#1|
Join Date: May 2003
Location: flat, steamy Champaign, IL
Hi. I'm trying to framelock/swaplock apps on two machines with
Quadro FX 3000G cards. nvidia-settings is happy to set up framelock;
now apparently I need to get each app to join a swap group and wait on a common barrier somehow.
I see the high-level description of what the GLX_NV_swap_group is supposed
to do, and the function calls in /usr/include/GL/glxext.h:
extern Bool glXJoinSwapGroupNV(Display *dpy, GLXDrawable drawable,
extern Bool glXBindSwapBarrierNV(Display *dpy, GLuint group, GLuint barrier);
extern Bool glXQuerySwapGroupNV(Display *dpy, GLXDrawable drawable,
GLuint *group, GLuint *barrier);
extern Bool glXQueryMaxSwapGroupsNV(Display *dpy, int screen,
GLuint *maxGroups, GLuint *maxBarriers);
But... how do I use these? The nvidia site notes that detailed documentation
is available to NVidia developers, but says that those are OEMs. I'm a software
developer (at U. of Illinois), but don't think I'd qualify as an OEM.
At a guess, usage might be:
0) Make sure each display/screen has been joined into a framelock group
using nvidia-settings or equivalent.
1) Call glXQueryMaxSwapGroupsNV() on the local display/screen
to find the range of possible group- and barrier- numbers
(I'm guessing they're small integers, 1 to maxGroups or similar)
2) Pick a pair of small positive integers (group, barrier)
and communicate them with the peer app(s).
(Is there any way to tell whether a value is in use by some unrelated app?
If not, is there any reason not to just always use group=1, barrier=1?)
3) Each app creates its window and then calls
glXJoinSwapGroupNV( dpy, window, group )
4) Each app calls
glXBindSwapBarrierNV( dpy, group, barrier )
5) Every glXSwapBuffers() thereafter is tied to the barrier.
If one of the peer apps dies, it'll wait forever (hmm?).
Anyone know whether that right? Or, are there any references that non-manufacturer-types can read?
|08-15-06, 05:19 PM||#2|
Join Date: Apr 2006
Re: GLX_NV_swap_group documentation/examples?
This document describes WGL_NV_swap_group extension, which is a Windows equivalent of GLX_NV_swap_group.