Lines Matching refs:psc
138 Display *dpy = pdraw->psc->dpy;
180 Display *dpy = pdraw->psc->dpy;
216 Display *dpy = pread->psc->dpy;
254 struct drisw_screen *psc = (struct drisw_screen *) context->psc;
261 (*psc->core->destroyContext) (pcp->driContext);
271 struct drisw_screen *psc = (struct drisw_screen *) pcp->base.psc;
282 if ((*psc->core->bindContext) (pcp->driContext,
293 struct drisw_screen *psc = (struct drisw_screen *) pcp->base.psc;
295 (*psc->core->unbindContext) (pcp->driContext);
307 struct drisw_screen *psc;
312 psc = (struct drisw_screen *) base->psc;
314 if (!psc->texBuffer)
317 if (psc->texBuffer->base.version >= 2 &&
318 psc->texBuffer->setTexBuffer2 != NULL) {
319 (*psc->texBuffer->setTexBuffer2) (pcp->driContext,
325 (*psc->texBuffer->setTexBuffer) (pcp->driContext,
341 struct dri2_screen *psc;
344 psc = (struct dri2_screen *) base->psc;
346 if (!psc->texBuffer)
349 if (psc->texBuffer->base.version >= 3 &&
350 psc->texBuffer->releaseTexBuffer != NULL) {
351 (*psc->texBuffer->releaseTexBuffer) (pcp->driContext,
378 struct drisw_screen *psc = (struct drisw_screen *) base;
381 if (!psc->base.driScreen)
401 if (!glx_context_init(&pcp->base, &psc->base, &config->base)) {
407 (*psc->core->createNewContext) (psc->driScreen,
429 struct drisw_screen *psc = (struct drisw_screen *) base;
440 if (!psc->base.driScreen)
443 if (psc->swrast->base.version < 3)
466 if (!glx_context_init(&pcp->base, &psc->base, &config->base)) {
486 (*psc->swrast->createContextAttribs) (psc->driScreen,
508 struct drisw_screen *psc = (struct drisw_screen *) pdp->base.psc;
510 (*psc->core->destroyDrawable) (pdp->driDrawable);
512 XDestroyDrawable(pdp, pdraw->psc->dpy, pdraw->drawable);
522 struct drisw_screen *psc = (struct drisw_screen *) base;
524 const __DRIswrastExtension *swrast = psc->swrast;
533 pdp->base.psc = &psc->base;
535 ret = XCreateDrawable(pdp, psc->base.dpy, xDrawable, modes->visualID);
543 (*swrast->createNewDrawable) (psc->driScreen, config->driConfig, pdp);
546 XDestroyDrawable(pdp, psc->base.dpy, xDrawable);
561 struct drisw_screen *psc = (struct drisw_screen *) pdp->base.psc;
567 (*psc->core->swapBuffers) (pdp->driDrawable);
575 struct drisw_screen *psc = (struct drisw_screen *) base;
578 (*psc->core->destroyScreen) (psc->driScreen);
579 driDestroyConfigs(psc->driver_configs);
580 psc->driScreen = NULL;
581 if (psc->driver)
582 dlclose(psc->driver);
604 driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
608 __glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read");
610 if (psc->swrast->base.version >= 3) {
611 __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
612 __glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
616 psc->base,
623 psc->texBuffer = (__DRItexBufferExtension *) extensions[i];
624 __glXEnableDirectExtension(&psc->base, "GLX_EXT_texture_from_pixmap");
635 struct drisw_screen *psc;
639 psc = Xcalloc(1, sizeof *psc);
640 if (psc == NULL)
643 memset(psc, 0, sizeof *psc);
644 if (!glx_screen_init(&psc->base, screen, priv)) {
645 Xfree(psc);
649 psc->driver = driOpenSwrast();
650 if (psc->driver == NULL)
653 extensions = dlsym(psc->driver, __DRI_DRIVER_EXTENSIONS);
661 psc->core = (__DRIcoreExtension *) extensions[i];
663 psc->swrast = (__DRIswrastExtension *) extensions[i];
666 if (psc->core == NULL || psc->swrast == NULL) {
671 psc->driScreen =
672 psc->swrast->createNewScreen(screen, loader_extensions,
673 &driver_configs, psc);
674 if (psc->driScreen == NULL) {
679 extensions = psc->core->getExtensions(psc->driScreen);
680 driswBindExtensions(psc, extensions);
682 configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs);
683 visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs);
688 glx_config_destroy_list(psc->base.configs);
689 psc->base.configs = configs;
690 glx_config_destroy_list(psc->base.visuals);
691 psc->base.visuals = visuals;
693 psc->driver_configs = driver_configs;
695 psc->base.vtable = &drisw_screen_vtable;
696 psp = &psc->vtable;
697 psc->base.driScreen = psp;
702 return &psc->base;
709 if (psc->driScreen)
710 psc->core->destroyScreen(psc->driScreen);
711 psc->driScreen = NULL;
713 if (psc->driver)
714 dlclose(psc->driver);
715 glx_screen_cleanup(&psc->base);
716 Xfree(psc);