Lines Matching refs:pcp
104 static int driUnbindContext(__DRIcontext *pcp)
115 if (pcp == NULL)
118 psp = pcp->driScreenPriv;
119 pdp = pcp->driDrawablePriv;
120 prp = pcp->driReadablePriv;
123 (*psp->DriverAPI.UnbindContext)(pcp);
148 pcp->driDrawablePriv = NULL;
161 static int driBindContext(__DRIcontext *pcp,
165 __DRIscreenPrivate *psp = pcp->driScreenPriv;
172 if (pcp == NULL || pdp == None || prp == None)
176 pcp->driDrawablePriv = pdp;
177 pcp->driReadablePriv = prp;
178 pdp->driContextPriv = pcp;
190 __driParseEvents(pcp, pdp);
191 __driParseEvents(pcp, prp);
207 (*psp->DriverAPI.MakeCurrent)(pcp, pdp, prp);
236 __DRIcontextPrivate *pcp = pdp->driContextPriv;
238 if (!pcp
239 || ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) {
284 __driParseEvents(__DRIcontextPrivate *pcp, __DRIdrawablePrivate *pdp)
294 if (pcp && psp->dri2.buffer->prealloc - pdp->dri2.tail > psp->dri2.buffer->size) {
298 DRM_UNLOCK(psp->fd, psp->lock, pcp->hHWContext);
301 DRM_LIGHT_LOCK(psp->fd, psp->lock, pcp->hHWContext);
364 (*psp->DriverAPI.HandleDrawableConfig)(pdp, pcp, last_dc);
380 (*psp->DriverAPI.HandleBufferAttach)(pdp, pcp, last_ba);
406 (*psp->DriverAPI.HandleBufferAttach)(pdp, pcp, ba);
658 driDestroyContext(__DRIcontext *pcp)
660 if (pcp) {
661 (*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp);
662 _mesa_free(pcp);
689 __DRIcontext *pcp;
692 pcp = _mesa_malloc(sizeof *pcp);
693 if (!pcp)
696 pcp->driScreenPriv = psp;
697 pcp->driDrawablePriv = NULL;
711 pcp->hHWContext = hwContext;
713 if ( !(*psp->DriverAPI.CreateContext)(&config->modes, pcp, shareCtx) ) {
714 _mesa_free(pcp);
718 return pcp;