Lines Matching defs:barrier
48 static Bool SwapBarrierIsReadyToSwap(GLuint barrier);
49 static void SwapSwapBarrier(GLuint barrier);
50 static void UpdateSwapBarrierList(GLuint barrier,
67 GLuint barrier;
142 if (pSwap->barrier && SwapBarrierIsReadyToSwap(pSwap->barrier)) {
143 /* The swap group is bound to a barrier and the barrier is ready
145 * group's swap barrier */
146 SwapSwapBarrier(pSwap->barrier);
147 } else if (!pSwap->barrier && SwapGroupIsReadyToSwap(pSwap)) {
149 * group is not bound to a swap barrier */
152 /* The swap group/barrier is not yet ready to swap, so put
167 * see if the entire swap group/barrier is ready to swap */
169 if (pSwap->barrier && SwapBarrierIsReadyToSwap(pSwap->barrier)) {
170 SwapSwapBarrier(pSwap->barrier);
171 } else if (!pSwap->barrier && SwapGroupIsReadyToSwap(pSwap)) {
194 pEntry->barrier = 0;
267 /* Update the barrier list as well */
268 if (pOldSwap->barrier)
269 UpdateSwapBarrierList(pOldSwap->barrier,
286 pOldSwap->barrier = 0;
361 /* Add pDraw to pMember's swap barrier */
362 pOldSwap->barrier = pEntry->barrier;
421 static Bool BindSwapGroupToBarrier(GLuint barrier, SwapGroupPtr pSwapGroup)
428 /* Add the swap group to barrier's list */
430 pBarrier->pNext = SwapBarrierList[barrier];
431 SwapBarrierList[barrier] = pBarrier;
436 static Bool UnbindSwapGroupFromBarrier(GLuint barrier, SwapGroupPtr pSwapGroup)
440 /* Find the swap group in barrier's list */
441 for (pBarrier = SwapBarrierList[barrier], pPrevBarrier = NULL;
446 /* Remove the swap group from barrier's list */
448 else SwapBarrierList[barrier] = pBarrier->pNext;
456 static void UpdateSwapBarrierList(GLuint barrier,
465 UnbindSwapGroupFromBarrier(barrier, pOldSwap);
469 /* Otherwise, find the old swap group in the barrier list and change
471 for (pBarrier = SwapBarrierList[barrier];
481 static Bool SwapBarrierIsReadyToSwap(GLuint barrier)
487 * to barrier are ready to swap */
488 for (pBarrier = SwapBarrierList[barrier];
496 static void SwapSwapBarrier(GLuint barrier)
500 /* Swap each group that is a member of this barrier */
501 for (pBarrier = SwapBarrierList[barrier];
507 int BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier)
511 if (barrier < 0 || barrier > GLX_MAX_SWAP_BARRIERS)
521 if (barrier && pSwapGroup->barrier) return BadValue;
523 /* Update the swap barrier list */
524 if (barrier) {
525 if (!BindSwapGroupToBarrier(barrier, pSwapGroup))
528 if (!UnbindSwapGroupFromBarrier(pSwapGroup->barrier, pSwapGroup))
532 /* Set the barrier for each member of this swap group */
534 pCur->barrier = barrier;