15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    NV_swap_group
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GLX_NV_swap_group
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciNotice
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Copyright NVIDIA Corporation, 2003.
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciStatus
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Shipping since 2003 on Quadro GPUs with framelock support
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciVersion
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    Date: 02/20/2008   Revision: 1.0
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciNumber
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    350
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ciDependencies
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    Written based on the wording of the GLX_SGIX_swap_group and 
285bd8deadSopenharmony_ci    GLX_SGIX_swap_barrier specifications.
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    SGIX_swap_control affects the definition of this extension
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciOverview
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    This extension provides the capability to synchronize the buffer
355bd8deadSopenharmony_ci    swaps of a group of OpenGL windows. A swap group is created, and
365bd8deadSopenharmony_ci    windows are added as members to the swap group.  Buffer swaps to
375bd8deadSopenharmony_ci    members of the swap group will then take place concurrently.
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ci    This extension also provides the capability to sychronize the buffer
405bd8deadSopenharmony_ci    swaps of different swap groups, which may reside on distributed
415bd8deadSopenharmony_ci    systems on a network. For this purpose swap groups can be bound to
425bd8deadSopenharmony_ci    a swap barrier.
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    This extension extends the set of conditions that must be met before
455bd8deadSopenharmony_ci    a buffer swap can take place.
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ciIssues
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    An implementation can not guarantee that the initialization of the swap
505bd8deadSopenharmony_ci    groups or barriers will succeed because the state of the window system may
515bd8deadSopenharmony_ci    restrict the usage of these features. Once a swap group or barrier has 
525bd8deadSopenharmony_ci    been sucessfully initialized, the implementation can only guarantee to
535bd8deadSopenharmony_ci    sustain swap group functionality as long as the state of the window system
545bd8deadSopenharmony_ci    does not restrict this. An example for a state that does typically not
555bd8deadSopenharmony_ci    restrict swap group usage is the use of one fullscreen sized window per
565bd8deadSopenharmony_ci    desktop.
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ciNew Procedures and Functions
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci    Bool glXJoinSwapGroupNV(Display *dpy,
615bd8deadSopenharmony_ci                            GLXDrawable drawable,
625bd8deadSopenharmony_ci                            GLuint group);
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci    Bool glXBindSwapBarrierNV(Display *dpy,
655bd8deadSopenharmony_ci                              GLuint group,
665bd8deadSopenharmony_ci                              GLuint barrier);
675bd8deadSopenharmony_ci
685bd8deadSopenharmony_ci    Bool glXQuerySwapGroupNV(Display *dpy,
695bd8deadSopenharmony_ci                             GLXDrawable drawable,
705bd8deadSopenharmony_ci                             GLuint *group,
715bd8deadSopenharmony_ci                             GLuint *barrier);
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ci    Bool glXQueryMaxSwapGroupsNV(Display *dpy, 
745bd8deadSopenharmony_ci                                 int screen,
755bd8deadSopenharmony_ci                                 GLuint *maxGroups,
765bd8deadSopenharmony_ci                                 GLuint *maxBarriers);
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ci    Bool glXQueryFrameCountNV(Display *dpy,
795bd8deadSopenharmony_ci                              int screen,
805bd8deadSopenharmony_ci                              GLuint *count);
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci    Bool glXResetFrameCountNV(Display *dpy,
835bd8deadSopenharmony_ci                              int screen);
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ciNew Tokens
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci    none
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ciAdditions to the GLX Specification
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci    Add to section 3.2.6, Double Buffering:
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci    glXJoinSwapGroupNV adds <drawable> to the swap group specified by
945bd8deadSopenharmony_ci    <group>.  If <drawable> is already a member of a different group,
955bd8deadSopenharmony_ci    it is implicitly removed from that group first. A swap group is
965bd8deadSopenharmony_ci    specified as an integer value between 0 and the value returned in
975bd8deadSopenharmony_ci    <maxGroups> by glXQueryMaxSwapGroupsNV. If <group> is zero, the
985bd8deadSopenharmony_ci    drawable is unbound from its current group, if any. If <group> is
995bd8deadSopenharmony_ci    larger than <maxGroups>, glXJoinSwapGroupNV fails.
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci    glXJoinSwapGroupNV returns True if <drawable> has been
1025bd8deadSopenharmony_ci    successfully bound to <group> and False if it fails.
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci    glXBindSwapBarrierNV binds the swap group specified by <group> to
1055bd8deadSopenharmony_ci    <barrier>.  <barrier> is an integer value between 0 and the value
1065bd8deadSopenharmony_ci    returned in <maxBarriers> by glXQueryMaxSwapGroupsNV. If <barrier>
1075bd8deadSopenharmony_ci    is zero, the group is unbound from its current barrier, if any. If
1085bd8deadSopenharmony_ci    <barrier> is larger than <maxBarriers>, glXBindSwapBarrierNV
1095bd8deadSopenharmony_ci    fails.  Subsequent buffer swaps for that group will be subject to
1105bd8deadSopenharmony_ci    this binding, until the group is unbound from <barrier>.
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci    glXBindSwapBarrierNV returns True if <group> has been successfully
1135bd8deadSopenharmony_ci    bound to <barrier> and False if it fails.
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci    glXQuerySwapGroupNV returns in <group> and <barrier> the group and
1165bd8deadSopenharmony_ci    barrier currently bound to <drawable,>, if any.
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci    glXQuerySwapGroupNV returns True if <group> and <barrier> could be
1195bd8deadSopenharmony_ci    successfully queried for <drawable> and False if it fails.  If it
1205bd8deadSopenharmony_ci    fails, the values of <group> and <barrier> are undefined.
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    glXQueryMaxSwapGroupsNV returns in <maxGroups> and <maxBarriers>
1235bd8deadSopenharmony_ci    the maximum number of swap groups and barriers supported by an
1245bd8deadSopenharmony_ci    implementation which drives <screen> and <dpy>.
1255bd8deadSopenharmony_ci
1265bd8deadSopenharmony_ci    glXQueryMaxSwapGroupsNV returns True if <maxGroups> and <maxBarriers>
1275bd8deadSopenharmony_ci    could be successfully queried for <screen> and <dpy>, and False if
1285bd8deadSopenharmony_ci    it fails.  If it fails, the values of <maxGroups> and <maxBarriers>
1295bd8deadSopenharmony_ci    are undefined.
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci    Before a buffer swap can take place, a set of conditions must be
1325bd8deadSopenharmony_ci    satisfied.  The conditions are defined in terms of the notions of
1335bd8deadSopenharmony_ci    when a drawable is ready to swap and when a group is ready to swap.
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ci    GLX drawables except windows are always ready to swap.
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    When a window is unmapped, it is always ready.
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ci    A window is ready when all of the following are true:
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci    1. A buffer swap command has been issued for it.
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci    2. Its swap interval has elapsed.
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci    A group is ready when the following is true:
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci    1. All windows in the group are ready.
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    All of the following must be satisfied before a buffer swap for a
1505bd8deadSopenharmony_ci    window can take place:
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ci    1. The window is ready.
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci    2. If the window belongs to a group, the group is ready.
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci    3. If the window belongs to a group and that group is bound to a 
1575bd8deadSopenharmony_ci       barrier, all groups using that barrier are ready.
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci    Buffer swaps for all windows in a swap group will take place
1605bd8deadSopenharmony_ci    concurrently after the conditions are satisfied for every window in
1615bd8deadSopenharmony_ci    the group.
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci    Buffer swaps for all groups using a barrier will take place
1645bd8deadSopenharmony_ci    concurrently after the conditions are satisfied for every window of
1655bd8deadSopenharmony_ci    every group using the barrier, if and only if the vertical retraces
1665bd8deadSopenharmony_ci    of the screens of all the groups are synchronized.  If they are not
1675bd8deadSopenharmony_ci    synchronized, there is no guarantee of concurrency between groups.
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci    An implementation may support a limited number of swap groups and
1705bd8deadSopenharmony_ci    barriers, and may have restrictions on where the users of a barrier
1715bd8deadSopenharmony_ci    can reside.  For example, an implementation may allow the users to
1725bd8deadSopenharmony_ci    reside on different display devices or even hosts.
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ci    An implementation may return zero for any of <maxGroups> and
1755bd8deadSopenharmony_ci    <maxBarriers> returned by glXQueryMaxSwapGroupsNV if swap groups or
1765bd8deadSopenharmony_ci    barriers are not available in that implementation or on that host.
1775bd8deadSopenharmony_ci
1785bd8deadSopenharmony_ci    The implementation provides a universal counter, the so called
1795bd8deadSopenharmony_ci    frame counter, among all systems that are locked together by swap
1805bd8deadSopenharmony_ci    groups/barriers. It is based on the internal synchronization
1815bd8deadSopenharmony_ci    signal which triggers the buffer swap.
1825bd8deadSopenharmony_ci
1835bd8deadSopenharmony_ci    glXQueryFrameCountNV returns in <count> the current frame counter
1845bd8deadSopenharmony_ci    for <swapGroup>.
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci    glXQueryFrameCountNV returns TRUE if the frame counter could be
1875bd8deadSopenharmony_ci    successfully retrieved. Otherwise it returns FALSE.
1885bd8deadSopenharmony_ci
1895bd8deadSopenharmony_ci    glXResetFrameCountNV resets the frame counter of <swapGroup> to zero.
1905bd8deadSopenharmony_ci
1915bd8deadSopenharmony_ci    glXResetFrameCountNV returns TRUE if the frame counter could be
1925bd8deadSopenharmony_ci    successfully reset, otherwise it returns FALSE. In a system that
1935bd8deadSopenharmony_ci    has an NVIDIA framelock add-on adapter installed and enabled,
1945bd8deadSopenharmony_ci    glXResetFrameCountNV will only succeed when the framelock is
1955bd8deadSopenharmony_ci    configured as a Master system.
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci    glXJoinSwapGroupNV, glXBindSwapBarrierNV, glXQuerySwapGroupNV,
1985bd8deadSopenharmony_ci    glXQueryMaxSwapGroupsNV, glXQueryFrameCountNV and
1995bd8deadSopenharmony_ci    glXResetFrameCountNV are part of the X stream.
2005bd8deadSopenharmony_ci
2015bd8deadSopenharmony_ciErrors
2025bd8deadSopenharmony_ci
2035bd8deadSopenharmony_ci    glXJoinSwapGroupNV, glXQuerySwapGroupNV and glXQueryMaxSwapGroupsNV
2045bd8deadSopenharmony_ci    generate GLXBadDrawable if <drawable> is an invalid GLX drawable.
2055bd8deadSopenharmony_ci
2065bd8deadSopenharmony_ciNew State
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci    None
2095bd8deadSopenharmony_ci
2105bd8deadSopenharmony_ciNew Implementation Dependent State
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ci    None
213