15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGIX_swap_barrier 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GLX_SGIX_swap_barrier 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci $Date: 1996/07/22 06:38:40 $ $Revision: 1.12 $ 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 92 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci SGIX_swap_control affects the definition of this extension 205bd8deadSopenharmony_ci SGI_cushion affects the definition of this extension 215bd8deadSopenharmony_ci SGIX_swap_group is required 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciOverview 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci This extension provides the capability to sychronize the buffer 265bd8deadSopenharmony_ci swaps of different swap groups. 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ci A swap group is bound to a _swap_barrier_. The buffer swaps of each 295bd8deadSopenharmony_ci swap group using that barrier will wait until every swap group using 305bd8deadSopenharmony_ci that barrier is ready to swap (where readiness is defined below), after 315bd8deadSopenharmony_ci which time all buffer swaps of all groups using that barrier will 325bd8deadSopenharmony_ci take place concurrently. 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci This extension extends the set of conditions that must be met before 355bd8deadSopenharmony_ci a buffer swap can take place. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ciIssues 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci * Should we have a query for the maximum number of supported barriers? 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ciNew Procedures and Functions 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci void BindSwapBarrierSGIX(Display *dpy, 445bd8deadSopenharmony_ci GLXDrawable drawable, 455bd8deadSopenharmony_ci int barrier); 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci Bool QueryMaxSwapBarriersSGIX(Display *dpy, 485bd8deadSopenharmony_ci int screen, 495bd8deadSopenharmony_ci int *max); 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ciNew Tokens 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci None 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ciAdditions to the GLX Specification 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci Add to section 3.2.6, Double Buffering: 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci BindSwapBarrierSGIX binds the swap group that contains <drawable> to 605bd8deadSopenharmony_ci <barrier>. Subsequent buffer swaps for that group will be subject to 615bd8deadSopenharmony_ci this binding, until the group is unbound from <barrier>. If <barrier> 625bd8deadSopenharmony_ci is zero, the group is unbound from its current barrier, if any. 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci QueryMaxSwapBarriersSGIX returns in <max> the maximum number of barriers 655bd8deadSopenharmony_ci supported by an implementation on <screen>. 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci QueryMaxSwapBarriersSGIX returns True if it success and False if it fails. 685bd8deadSopenharmony_ci If it fails, <max> is unchanged. 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci Before a buffer swap can take place, a set of conditions must be 715bd8deadSopenharmony_ci satisfied. The conditions are defined in terms of the notions of when 725bd8deadSopenharmony_ci a drawable is ready to swap and when a group is ready to swap. 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci Any GLX drawable that is not a window is always ready. 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci When a window is unmapped, it is always ready. 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci When a window is mapped, it is ready when all of the following are true: 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci 1. A buffer swap command has been issued for it. 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ci 2. Its swap interval has elapsed. 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci A group is ready when the following is true: 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci 1. All windows in the group are ready. 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci All of the following must be satisfied before a buffer swap for a window 895bd8deadSopenharmony_ci can take place: 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci 1. The window is ready. 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci 2. If the window belongs to a group, the group is ready. 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci 3. If the window belongs to a group and that group is bound to a 965bd8deadSopenharmony_ci barrier, all groups using that barrier are ready. 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci Buffer swaps for all windows in a swap group will take place concurrently 995bd8deadSopenharmony_ci after the conditions are satisfied for every window in the group. 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci Buffer swaps for all groups using a barrier will take place concurrently 1025bd8deadSopenharmony_ci after the conditions are satisfied for every window of every group using 1035bd8deadSopenharmony_ci the barrier, if and only if the vertical retraces of the screens of all 1045bd8deadSopenharmony_ci the groups are synchronized. If they are not synchronized, there is no 1055bd8deadSopenharmony_ci guarantee of concurrency between groups. 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci Both BindSwapBarrierSGIX and QueryMaxSwapBarrierSGIX are part of the X 1085bd8deadSopenharmony_ci stream. 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci An implementation may support a limited number of swap barriers, 1115bd8deadSopenharmony_ci and may have restrictions on where the users of a barrier can reside. 1125bd8deadSopenharmony_ci For example, an implementation may allow the users to reside on different 1135bd8deadSopenharmony_ci screens, displays, or even hosts. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ciErrors 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci BindSwapBarrierSGIX generates BadValue if <barrier> is already bound to 1185bd8deadSopenharmony_ci another swap group or if <barrier> is not a valid name of a barrier. 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci BindSwapBarrierSGIX generates BadGLXDrawable if <drawable> is an 1215bd8deadSopenharmony_ci invalid GLX drawable. 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci QueryMaxSwapBarrierSGIX generates BadValue if <screen> is not a valid 1245bd8deadSopenharmony_ci screen. 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ciNew State 1275bd8deadSopenharmony_ci Initial 1285bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib 1295bd8deadSopenharmony_ci --------- ----------- ---- ------- ------ 1305bd8deadSopenharmony_ci <current barrier bound to group> ?? 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ciNew Implementation Dependent State 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci None 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci 139