static pointer xf8_16bppSetup(pointer module, pointer opts, int *errmaj, int *errmin) { if (!LoadSubModule(module, "cfb", NULL, NULL, NULL, NULL, errmaj, errmin)) return NULL; if (!LoadSubModule(module, "cfb16", NULL, NULL, NULL, NULL, errmaj, errmin)) return NULL; return (pointer)1; /* non-NULL required to indicate success */ }
static pointer cfbSetup(pointer module, pointer opts, int *errmaj, int *errmin) { /* This modules requires mfb, so load it */ return LoadSubModule(module, "mfb", NULL, NULL, NULL, NULL, errmaj, errmin); }
static pointer xf4bppSetup(pointer module, pointer opts, int *errmaj, int *errmin) { /* This module requires xf1bpp for bitmap support */ return LoadSubModule(module, "xf1bpp", NULL, NULL, NULL, NULL, errmaj, errmin); }
static pointer glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; pointer GLcore = NULL; #ifdef GLX_USE_SGI_SI char GLcoreName[] = "GL"; #else char GLcoreName[] = "GLcore"; #endif if (!setupDone) { setupDone = TRUE; GLcore = LoadSubModule(module, GLcoreName, NULL, NULL, NULL, NULL, errmaj, errmin); if (!GLcore) { if (errmaj) *errmaj = LDR_NOSUBENT; } else { LoaderReqSymLists(glcoreSymbols, NULL); LoadExtension(&GLXExt, FALSE); /* Wrap the init visuals routine in micmap.c */ GlxWrapInitVisuals(&miInitVisualsProc); /* Make sure this gets wrapped each time InitVisualWrap is called */ miHookInitVisuals(NULL, GlxWrapInitVisuals); } } else { if (errmaj) *errmaj = LDR_ONCEONLY; } /* Need a non-NULL return value to indicate success */ return GLcore; }
pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) { pointer ret; int errmaj = 0, errmin = 0; ret = LoadSubModule(pScrn->module, name, NULL, NULL, NULL, NULL, &errmaj, &errmin); if (!ret) LoaderErrorMsg(pScrn->name, name, errmaj, errmin); return ret; }
pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name) { pointer ret; int errmaj = 0, errmin = 0; ret = LoadSubModule(drv->module, name, NULL, NULL, NULL, NULL, &errmaj, &errmin); if (!ret) LoaderErrorMsg(NULL, name, errmaj, errmin); return ret; }