mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 04:40:09 +01:00
Use dlsym() to avoid referencing __dri2DriverInitScreen.
Sort-of a stop-gap workaround. There are a couple of nicer ways to do this that doesn't require dlfcn.h, but they're more invasive.
This commit is contained in:
parent
bcecea6ea6
commit
129b9ad16f
1 changed files with 6 additions and 1 deletions
|
|
@ -883,6 +883,11 @@ __DRI2_CREATE_NEW_SCREEN(int scrn, __DRIscreen *psc,
|
||||||
static const __DRIextension *emptyExtensionList[] = { NULL };
|
static const __DRIextension *emptyExtensionList[] = { NULL };
|
||||||
dri_interface = interface;
|
dri_interface = interface;
|
||||||
unsigned int *p;
|
unsigned int *p;
|
||||||
|
__GLcontextModes *(*initScreen)(__DRIscreen *psc);
|
||||||
|
|
||||||
|
initScreen = dlsym(NULL, __dri2DriverInitScreen);
|
||||||
|
if (initScreen == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
psp = _mesa_malloc(sizeof(*psp));
|
psp = _mesa_malloc(sizeof(*psp));
|
||||||
if (!psp)
|
if (!psp)
|
||||||
|
|
@ -931,7 +936,7 @@ __DRI2_CREATE_NEW_SCREEN(int scrn, __DRIscreen *psc,
|
||||||
psc->createNewDrawable = driCreateNewDrawable;
|
psc->createNewDrawable = driCreateNewDrawable;
|
||||||
psc->createNewContext = driCreateNewContext;
|
psc->createNewContext = driCreateNewContext;
|
||||||
|
|
||||||
*driver_modes = __dri2DriverInitScreen(psp);
|
*driver_modes = initScreen(psp);
|
||||||
if (*driver_modes == NULL) {
|
if (*driver_modes == NULL) {
|
||||||
drmBOUnmap(psp->fd, &psp->dri2.sareaBO);
|
drmBOUnmap(psp->fd, &psp->dri2.sareaBO);
|
||||||
drmBOUnreference(psp->fd, &psp->dri2.sareaBO);
|
drmBOUnreference(psp->fd, &psp->dri2.sareaBO);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue