Lines Matching refs:glxc
247 __GLXcontext *glxc, *shareglxc; in DoCreateContext() local
308 glxc = pGlxScreen->createContext(pGlxScreen, config, shareglxc, in DoCreateContext()
312 glxc = __glXdirectContextCreate(pGlxScreen, config, shareglxc); in DoCreateContext()
313 if (!glxc) { in DoCreateContext()
319 glxc->pGlxScreen = pGlxScreen; in DoCreateContext()
320 glxc->config = config; in DoCreateContext()
321 glxc->id = gcId; in DoCreateContext()
322 glxc->share_id = shareList; in DoCreateContext()
323 glxc->idExists = GL_TRUE; in DoCreateContext()
324 glxc->isDirect = isDirect; in DoCreateContext()
325 glxc->renderMode = GL_RENDER; in DoCreateContext()
335 glxc->resetNotificationStrategy = GLX_NO_RESET_NOTIFICATION_ARB; in DoCreateContext()
347 glxc->releaseBehavior = GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB; in DoCreateContext()
352 if (!__glXAddContext(glxc)) { in DoCreateContext()
353 (*glxc->destroy) (glxc); in DoCreateContext()
420 __GLXcontext *glxc; in __glXDisp_DestroyContext() local
424 &glxc, &err)) in __glXDisp_DestroyContext()
427 glxc->idExists = GL_FALSE; in __glXDisp_DestroyContext()
428 if (glxc->currentClient) { in __glXDisp_DestroyContext()
429 XID ghost = FakeClientID(glxc->currentClient->index); in __glXDisp_DestroyContext()
431 if (!AddResource(ghost, __glXContextRes, glxc)) in __glXDisp_DestroyContext()
433 ChangeResourceValue(glxc->id, __glXContextRes, NULL); in __glXDisp_DestroyContext()
434 glxc->id = ghost; in __glXDisp_DestroyContext()
467 __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, ClientPtr client, in __glXGetDrawable() argument
478 if (glxc != NULL && in __glXGetDrawable()
479 glxc->config != NULL && in __glXGetDrawable()
480 glxc->config != pGlxDraw->config) { in __glXGetDrawable()
490 if (glxc == NULL) { in __glXGetDrawable()
508 pGlxScreen = glxc->pGlxScreen; in __glXGetDrawable()
515 config = glxc->config; in __glXGetDrawable()
561 __GLXcontext *glxc = NULL, *prevglxc = NULL; in xorgGlxMakeCurrent() local
589 if (!validGlxContext(client, contextId, DixUseAccess, &glxc, &error)) in xorgGlxMakeCurrent()
592 if ((glxc != prevglxc) && glxc->currentClient) in xorgGlxMakeCurrent()
596 drawPriv = __glXGetDrawable(glxc, drawId, client, &status); in xorgGlxMakeCurrent()
602 readPriv = __glXGetDrawable(glxc, readId, client, &status); in xorgGlxMakeCurrent()
632 if (glxc && !glxc->isDirect) { in xorgGlxMakeCurrent()
633 glxc->drawPriv = drawPriv; in xorgGlxMakeCurrent()
634 glxc->readPriv = readPriv; in xorgGlxMakeCurrent()
637 lastGLContext = glxc; in xorgGlxMakeCurrent()
638 if (!(*glxc->makeCurrent) (glxc)) { in xorgGlxMakeCurrent()
640 glxc->drawPriv = NULL; in xorgGlxMakeCurrent()
641 glxc->readPriv = NULL; in xorgGlxMakeCurrent()
645 glxc->currentClient = client; in xorgGlxMakeCurrent()
646 glxServer.setContextTagPrivate(client, newContextTag, glxc); in xorgGlxMakeCurrent()
683 __GLXcontext *glxc; in __glXDisp_IsDirect() local
686 if (!validGlxContext(cl->client, req->context, DixReadAccess, &glxc, &err)) in __glXDisp_IsDirect()
693 .isDirect = glxc->isDirect in __glXDisp_IsDirect()
751 __GLXcontext *glxc = NULL; in __glXDisp_WaitGL() local
756 glxc = __glXLookupContextByTag(cl, tag); in __glXDisp_WaitGL()
757 if (!glxc) in __glXDisp_WaitGL()
766 if (glxc && glxc->drawPriv->waitGL) in __glXDisp_WaitGL()
767 (*glxc->drawPriv->waitGL) (glxc->drawPriv); in __glXDisp_WaitGL()
777 __GLXcontext *glxc = NULL; in __glXDisp_WaitX() local
782 glxc = __glXLookupContextByTag(cl, tag); in __glXDisp_WaitX()
783 if (!glxc) in __glXDisp_WaitX()
790 if (glxc && glxc->drawPriv->waitX) in __glXDisp_WaitX()
791 (*glxc->drawPriv->waitX) (glxc->drawPriv); in __glXDisp_WaitX()
1592 __GLXcontext *glxc = NULL; in __glXDisp_SwapBuffers() local
1599 glxc = __glXLookupContextByTag(cl, tag); in __glXDisp_SwapBuffers()
1600 if (!glxc) { in __glXDisp_SwapBuffers()
1620 pGlxDraw = __glXGetDrawable(glxc, drawId, client, &error); in __glXDisp_SwapBuffers()
1783 __GLXcontext *glxc = NULL; in __glXDisp_CopySubBufferMESA() local
1804 glxc = __glXLookupContextByTag(cl, tag); in __glXDisp_CopySubBufferMESA()
1805 if (!glxc) { in __glXDisp_CopySubBufferMESA()
1825 pGlxDraw = __glXGetDrawable(glxc, drawId, client, &error); in __glXDisp_CopySubBufferMESA()
1975 __GLXcontext *glxc; in __glXDisp_Render() local
1987 glxc = __glXForceCurrent(cl, req->contextTag, &error); in __glXDisp_Render()
1988 if (!glxc) { in __glXDisp_Render()
2075 __GLXcontext *glxc; in __glXDisp_RenderLarge() local
2092 glxc = __glXForceCurrent(cl, req->contextTag, &error); in __glXDisp_RenderLarge()
2093 if (!glxc) { in __glXDisp_RenderLarge()
2106 ResetLargeCommandStatus(glxc); in __glXDisp_RenderLarge()
2111 if (glxc->largeCmdRequestsSoFar == 0) { in __glXDisp_RenderLarge()
2170 if (glxc->largeCmdBufSize < cmdlen) { in __glXDisp_RenderLarge()
2171 GLbyte *newbuf = glxc->largeCmdBuf; in __glXDisp_RenderLarge()
2176 glxc->largeCmdBuf = newbuf; in __glXDisp_RenderLarge()
2177 glxc->largeCmdBufSize = cmdlen; in __glXDisp_RenderLarge()
2179 memcpy(glxc->largeCmdBuf, pc, dataBytes); in __glXDisp_RenderLarge()
2181 glxc->largeCmdBytesSoFar = dataBytes; in __glXDisp_RenderLarge()
2182 glxc->largeCmdBytesTotal = cmdlen; in __glXDisp_RenderLarge()
2183 glxc->largeCmdRequestsSoFar = 1; in __glXDisp_RenderLarge()
2184 glxc->largeCmdRequestsTotal = req->requestTotal; in __glXDisp_RenderLarge()
2198 if (req->requestNumber != glxc->largeCmdRequestsSoFar + 1) { in __glXDisp_RenderLarge()
2200 ResetLargeCommandStatus(glxc); in __glXDisp_RenderLarge()
2203 if (req->requestTotal != glxc->largeCmdRequestsTotal) { in __glXDisp_RenderLarge()
2205 ResetLargeCommandStatus(glxc); in __glXDisp_RenderLarge()
2212 if ((bytesSoFar = safe_add(glxc->largeCmdBytesSoFar, dataBytes)) < 0) { in __glXDisp_RenderLarge()
2214 ResetLargeCommandStatus(glxc); in __glXDisp_RenderLarge()
2218 if (bytesSoFar > glxc->largeCmdBytesTotal) { in __glXDisp_RenderLarge()
2220 ResetLargeCommandStatus(glxc); in __glXDisp_RenderLarge()
2224 memcpy(glxc->largeCmdBuf + glxc->largeCmdBytesSoFar, pc, dataBytes); in __glXDisp_RenderLarge()
2225 glxc->largeCmdBytesSoFar += dataBytes; in __glXDisp_RenderLarge()
2226 glxc->largeCmdRequestsSoFar++; in __glXDisp_RenderLarge()
2228 if (req->requestNumber == glxc->largeCmdRequestsTotal) { in __glXDisp_RenderLarge()
2244 if (safe_pad(glxc->largeCmdBytesSoFar) != glxc->largeCmdBytesTotal) { in __glXDisp_RenderLarge()
2246 ResetLargeCommandStatus(glxc); in __glXDisp_RenderLarge()
2249 hdr = (__GLXrenderLargeHeader *) glxc->largeCmdBuf; in __glXDisp_RenderLarge()
2269 (*proc) (glxc->largeCmdBuf + __GLX_RENDER_LARGE_HDR_SIZE); in __glXDisp_RenderLarge()
2274 ResetLargeCommandStatus(glxc); in __glXDisp_RenderLarge()