diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index dd56f9ca4..0d613be8e 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -1235,14 +1235,24 @@ DRI2CloseScreen(ScreenPtr pScreen) } extern ExtensionModule dri2ExtensionModule; +extern Bool DRI2ModuleSetup(void); + +/* Called by InitExtensions() */ +Bool +DRI2ModuleSetup(void) +{ + dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable"); + if (!dri2DrawableRes) + return FALSE; + + return TRUE; +} static pointer DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; - dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable"); - if (!setupDone) { setupDone = TRUE; diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c index 934abf6de..e612cf051 100644 --- a/hw/xfree86/dri2/dri2ext.c +++ b/hw/xfree86/dri2/dri2ext.c @@ -50,6 +50,7 @@ #include "xf86Module.h" static ExtensionEntry *dri2Extension; +extern Bool DRI2ModuleSetup(void); static Bool validDrawable(ClientPtr client, XID drawable, Mask access_mode, @@ -634,6 +635,8 @@ DRI2ExtensionInit(void) StandardMinorOpcode); DRI2EventBase = dri2Extension->eventBase; + + DRI2ModuleSetup(); } extern Bool noDRI2Extension;