Lines Matching refs:psc
228 struct glx_screen *psc = glxDraw->psc;
229 Display *dpy = psc->dpy;
238 drawable = RootWindow(dpy, psc->scr);
280 struct glx_screen *psc = glxDraw->psc;
281 Display *dpy = psc->dpy;
283 return XF86DRIGetDrawableInfo(dpy, psc->scr, glxDraw->drawable,
310 * \param psc DRI screen information.
318 CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
434 psp = (*psc->legacy->createNewScreen) (scrn,
442 &driver_configs, psc);
449 configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs);
450 visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs);
455 glx_config_destroy_list(psc->base.configs);
456 psc->base.configs = configs;
457 glx_config_destroy_list(psc->base.visuals);
458 psc->base.visuals = visuals;
460 psc->driver_configs = driver_configs;
466 for (visual = psc->base.visuals; visual; visual = visual->next) {
515 struct dri_screen *psc = (struct dri_screen *) context->psc;
522 (*psc->core->destroyContext) (pcp->driContext);
524 XF86DRIDestroyContext(psc->base.dpy, psc->base.scr, pcp->hwContextID);
533 struct dri_screen *psc = (struct dri_screen *) pcp->base.psc;
544 if ((*psc->core->bindContext) (pcp->driContext,
555 struct dri_screen *psc = (struct dri_screen *) pcp->base.psc;
557 (*psc->core->unbindContext) (pcp->driContext);
578 struct dri_screen *psc = (struct dri_screen *) base;
583 if (!psc->base.driScreen)
603 if (!glx_context_init(&pcp->base, &psc->base, &config->base)) {
608 if (!XF86DRICreateContextWithConfig(psc->base.dpy, psc->base.scr,
616 (*psc->legacy->createNewContext) (psc->driScreen,
620 XF86DRIDestroyContext(psc->base.dpy, psc->base.scr, pcp->hwContextID);
633 struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
636 (*psc->core->destroyDrawable) (pdp->driDrawable);
637 XF86DRIDestroyDrawable(psc->base.dpy, psc->base.scr, pdraw->drawable);
649 struct dri_screen *psc = (struct dri_screen *) base;
662 pdp->base.psc = &psc->base;
664 if (!XF86DRICreateDrawable(psc->base.dpy, psc->base.scr,
672 (*psc->legacy->createNewDrawable) (psc->driScreen,
679 XF86DRIDestroyDrawable(psc->base.dpy, psc->base.scr, drawable);
693 struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
696 (*psc->core->swapBuffers) (pdp->driDrawable);
705 struct dri_screen *psc = (struct dri_screen *) pdp->base.psc;
707 (*psc->driCopySubBuffer->copySubBuffer) (pdp->driDrawable,
714 struct dri_screen *psc = (struct dri_screen *) base;
717 if (psc->driScreen)
718 (*psc->core->destroyScreen) (psc->driScreen);
719 driDestroyConfigs(psc->driver_configs);
720 psc->driScreen = NULL;
721 if (psc->driver)
722 dlclose(psc->driver);
731 struct dri_screen *psc = (struct dri_screen *) base;
734 if (pdp && psc->sbc && psc->msc)
735 return ( (*psc->msc->getMSC)(psc->driScreen, msc) == 0 &&
736 (*psc->sbc->getSBC)(pdp->driDrawable, sbc) == 0 &&
744 struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
747 if (pdp != NULL && psc->msc != NULL) {
748 ret = (*psc->msc->waitForMSC) (pdp->driDrawable, target_msc,
764 if (pdp != NULL && psc->sbc != NULL) {
766 (*psc->sbc->waitForSBC) (pdp->driDrawable, target_sbc, msc, sbc);
774 return DRI2WaitSBC(pdp->base.psc->dpy,
784 struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
786 if (psc->swapControl != NULL && pdraw != NULL) {
787 psc->swapControl->setSwapInterval(pdp->driDrawable, interval);
798 struct dri_screen *psc = (struct dri_screen *) pdraw->psc;
800 if (psc->swapControl != NULL && pdraw != NULL)
801 return psc->swapControl->getSwapInterval(pdp->driDrawable);
808 driBindExtensions(struct dri_screen *psc, const __DRIextension **extensions)
816 psc->swapControl = (__DRIswapControlExtension *) extensions[i];
817 __glXEnableDirectExtension(&psc->base, "GLX_SGI_swap_control");
818 __glXEnableDirectExtension(&psc->base, "GLX_MESA_swap_control");
822 psc->msc = (__DRImediaStreamCounterExtension *) extensions[i];
823 __glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
827 psc->driCopySubBuffer = (__DRIcopySubBufferExtension *) extensions[i];
828 __glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer");
832 __glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read");
849 struct dri_screen *psc;
853 psc = Xcalloc(1, sizeof *psc);
854 if (psc == NULL)
857 memset(psc, 0, sizeof *psc);
858 if (!glx_screen_init(&psc->base, screen, priv)) {
859 Xfree(psc);
867 psc->driver = driOpenDriver(driverName);
868 if (psc->driver == NULL)
871 extensions = dlsym(psc->driver, __DRI_DRIVER_EXTENSIONS);
879 psc->core = (__DRIcoreExtension *) extensions[i];
881 psc->legacy = (__DRIlegacyExtension *) extensions[i];
884 if (psc->core == NULL || psc->legacy == NULL)
888 psc->driScreen =
889 CallCreateNewScreen(psc->base.dpy, screen, psc, pdp);
890 if (psc->driScreen == NULL)
893 extensions = psc->core->getExtensions(psc->driScreen);
894 driBindExtensions(psc, extensions);
896 psc->base.vtable = &dri_screen_vtable;
897 psp = &psc->vtable;
898 psc->base.driScreen = psp;
899 if (psc->driCopySubBuffer)
917 return &psc->base;
924 if (psc->driver)
925 dlclose(psc->driver);
926 glx_screen_cleanup(&psc->base);
927 Xfree(psc);