Lines Matching full:gc
233 glx_context_init(struct glx_context *gc, in glx_context_init() argument
236 gc->majorOpcode = __glXSetupForCommand(psc->display->dpy); in glx_context_init()
237 if (!gc->majorOpcode) in glx_context_init()
240 gc->psc = psc; in glx_context_init()
241 gc->config = config; in glx_context_init()
242 gc->isDirect = GL_TRUE; in glx_context_init()
243 gc->currentContextTag = -1; in glx_context_init()
246 gc->renderType = GLX_DONT_CARE; in glx_context_init()
297 struct glx_context *gc; in CreateContext() local
318 gc = NULL; in CreateContext()
320 gc = applegl_create_context(psc, config, shareList, renderType); in CreateContext()
323 gc = psc->vtable->create_context(psc, config, shareList, renderType); in CreateContext()
324 if (!gc) in CreateContext()
325 gc = indirect_create_context(psc, config, shareList, renderType); in CreateContext()
327 if (!gc) in CreateContext()
337 req->reqType = gc->majorOpcode; in CreateContext()
339 req->context = gc->xid = XAllocID(dpy); in CreateContext()
343 req->isDirect = gc->isDirect; in CreateContext()
352 req->reqType = gc->majorOpcode; in CreateContext()
354 req->context = gc->xid = XAllocID(dpy); in CreateContext()
359 req->isDirect = gc->isDirect; in CreateContext()
373 gc->share_xid = shareList ? shareList->xid : None; in CreateContext()
374 gc->imported = GL_FALSE; in CreateContext()
383 int isDirect = __glXIsDirect(dpy, gc->xid, &error); in CreateContext()
385 if (error != False || isDirect != gc->isDirect) { in CreateContext()
386 gc->vtable->destroy(gc); in CreateContext()
387 gc = NULL; in CreateContext()
391 return (GLXContext) gc; in CreateContext()
453 struct glx_context *gc = (struct glx_context *) ctx; in glXDestroyContext() local
455 if (gc == NULL || gc->xid == None) in glXDestroyContext()
459 if (!gc->imported) in glXDestroyContext()
460 glx_send_destroy_context(dpy, gc->xid); in glXDestroyContext()
462 if (gc->currentDpy) { in glXDestroyContext()
465 * Note that we set gc->xid = None above. In MakeContextCurrent() in glXDestroyContext()
468 gc->xid = None; in glXDestroyContext()
470 gc->vtable->destroy(gc); in glXDestroyContext()
521 struct glx_context *gc = __glXGetCurrentContext(); in glXWaitGL() local
523 if (gc->vtable->wait_gl) in glXWaitGL()
524 gc->vtable->wait_gl(gc); in glXWaitGL()
534 struct glx_context *gc = __glXGetCurrentContext(); in glXWaitX() local
536 if (gc->vtable->wait_x) in glXWaitX()
537 gc->vtable->wait_x(gc); in glXWaitX()
543 struct glx_context *gc = __glXGetCurrentContext(); in glXUseXFont() local
545 Display *dpy = gc->currentDpy; in glXUseXFont()
548 if (gc->isDirect) { in glXUseXFont()
549 DRI_glXUseXFont(gc, font, first, count, listBase); in glXUseXFont()
555 __glXFlushRenderBuffer(gc, gc->pc); in glXUseXFont()
560 req->reqType = gc->majorOpcode; in glXUseXFont()
562 req->contextTag = gc->currentContextTag; in glXUseXFont()
592 struct glx_context *gc = __glXGetCurrentContext(); in glXCopyContext() local
596 if(apple_glx_copy_context(gc->driContext, source->driContext, dest->driContext, in glXCopyContext()
603 struct glx_context *gc = __glXGetCurrentContext(); in glXCopyContext() local
613 if (gc->isDirect) { in glXCopyContext()
622 if (source == gc && dpy == gc->currentDpy) { in glXCopyContext()
623 tag = gc->currentContextTag; in glXCopyContext()
647 struct glx_context *gc = (struct glx_context *) gc_user; in glXIsDirect() local
650 return gc ? gc->isDirect : False; in glXIsDirect()
657 struct glx_context * gc = __glXGetCurrentContext(); in glXSwapBuffers() local
658 if(gc != &dummyContext && apple_glx_is_current_drawable(dpy, gc->driContext, drawable)) { in glXSwapBuffers()
659 apple_glx_swap_buffers(gc->driContext); in glXSwapBuffers()
664 struct glx_context *gc; in glXSwapBuffers()
669 gc = __glXGetCurrentContext(); in glXSwapBuffers()
676 Bool flush = gc != &dummyContext && drawable == gc->currentDrawable; in glXSwapBuffers()
694 if ((gc != &dummyContext) && (dpy == gc->currentDpy) && in glXSwapBuffers()
695 ((drawable == gc->currentDrawable) in glXSwapBuffers()
696 || (drawable == gc->currentReadable))) { in glXSwapBuffers()
697 tag = gc->currentContextTag; in glXSwapBuffers()
1218 struct glx_context *gc = __glXGetCurrentContext(); in glXGetCurrentDisplay() local
1219 if (gc == &dummyContext) in glXGetCurrentDisplay()
1221 return gc->currentDpy; in glXGetCurrentDisplay()
1376 struct glx_context *gc = (struct glx_context *) ctx; in glXFreeContextEXT() local
1378 if (gc == NULL || gc->xid == None) in glXFreeContextEXT()
1390 if (gc->currentDpy) { in glXFreeContextEXT()
1391 gc->xid = None; in glXFreeContextEXT()
1393 gc->vtable->destroy(gc); in glXFreeContextEXT()
1458 struct glx_context *gc = __glXGetCurrentContext(); in glXGetCurrentReadDrawable() local
1460 return gc->currentReadable; in glXGetCurrentReadDrawable()
1543 struct glx_context *gc = __glXGetCurrentContext(); in glXSwapIntervalSGI() local
1545 struct glx_screen *psc = gc->psc; in glXSwapIntervalSGI()
1551 if (gc == &dummyContext) { in glXSwapIntervalSGI()
1560 if (gc->isDirect && psc && psc->driScreen.setSwapInterval) { in glXSwapIntervalSGI()
1561 __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable); in glXSwapIntervalSGI()
1571 dpy = gc->currentDpy; in glXSwapIntervalSGI()
1583 req->contextTag = gc->currentContextTag; in glXSwapIntervalSGI()
1603 struct glx_context *gc = __glXGetCurrentContext(); in glXSwapIntervalMESA() local
1608 if (gc != &dummyContext && gc->isDirect) { in glXSwapIntervalMESA()
1609 struct glx_screen *psc = gc->psc; in glXSwapIntervalMESA()
1612 GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable); in glXSwapIntervalMESA()
1633 struct glx_context *gc = __glXGetCurrentContext(); in glXGetSwapIntervalMESA() local
1635 if (gc != &dummyContext && gc->isDirect) { in glXGetSwapIntervalMESA()
1636 struct glx_screen *psc = gc->psc; in glXGetSwapIntervalMESA()
1639 GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable); in glXGetSwapIntervalMESA()
1688 struct glx_context *gc = __glXGetCurrentContext(); in glXGetVideoSyncSGI() local
1689 struct glx_screen *psc = gc->psc; in glXGetVideoSyncSGI()
1692 if (gc == &dummyContext) in glXGetVideoSyncSGI()
1695 if (!gc->isDirect) in glXGetVideoSyncSGI()
1698 if (!gc->currentDrawable) in glXGetVideoSyncSGI()
1701 pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable); in glXGetVideoSyncSGI()
1720 struct glx_context *gc = __glXGetCurrentContext(); in glXWaitVideoSyncSGI() local
1722 struct glx_screen *psc = gc->psc; in glXWaitVideoSyncSGI()
1731 if (gc == &dummyContext) in glXWaitVideoSyncSGI()
1735 if (!gc->isDirect) in glXWaitVideoSyncSGI()
1738 if (!gc->currentDrawable) in glXWaitVideoSyncSGI()
1741 pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable); in glXWaitVideoSyncSGI()
1928 struct glx_context *gc = __glXGetCurrentContext(); in glXSwapBuffersMscOML() local
1934 if (gc == &dummyContext) /* no GLX for this */ in glXSwapBuffersMscOML()
1938 if (!pdraw || !gc->isDirect) in glXSwapBuffersMscOML()
2035 struct glx_context *gc; in glXCopySubBufferMESA() local
2061 gc = __glXGetCurrentContext(); in glXCopySubBufferMESA()
2062 if ((gc != &dummyContext) && (dpy == gc->currentDpy) && in glXCopySubBufferMESA()
2063 ((drawable == gc->currentDrawable) || in glXCopySubBufferMESA()
2064 (drawable == gc->currentReadable))) { in glXCopySubBufferMESA()
2065 tag = gc->currentContextTag; in glXCopySubBufferMESA()
2100 struct glx_context *gc = __glXGetCurrentContext(); in glXBindTexImageEXT() local
2133 req->contextTag = gc->currentContextTag; in glXBindTexImageEXT()
2161 struct glx_context *gc = __glXGetCurrentContext(); in glXReleaseTexImageEXT() local
2182 req->contextTag = gc->currentContextTag; in glXReleaseTexImageEXT()
2407 struct glx_context *gc = (struct glx_context*)context; in MesaGLInteropGLXQueryDeviceInfo() local
2412 if (!gc || gc->xid == None || !gc->isDirect) { in MesaGLInteropGLXQueryDeviceInfo()
2417 ret = dri_interop_query_device_info(gc->driContext, out); in MesaGLInteropGLXQueryDeviceInfo()
2427 struct glx_context *gc = (struct glx_context*)context; in MesaGLInteropGLXExportObject() local
2432 if (!gc || gc->xid == None || !gc->isDirect) { in MesaGLInteropGLXExportObject()
2437 ret = dri_interop_export_object(gc->driContext, in, out); in MesaGLInteropGLXExportObject()
2448 struct glx_context *gc = (struct glx_context*)context; in MesaGLInteropGLXFlushObjects() local
2453 if (!gc || gc->xid == None || !gc->isDirect) { in MesaGLInteropGLXFlushObjects()
2458 ret = dri_interop_flush_objects(gc->driContext, count, resources, out); in MesaGLInteropGLXFlushObjects()