//bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #1287

(https://bugs.freedesktop.org/attachment.cgi?id=1287): Avoid DRI
    initalisation when the Xfree86-DRI extension was turned off. Patch by
    Kristian Hgsberg <krh@bitplanet.net>.
This commit is contained in:
Roland Mainz 2004-12-08 05:52:20 +00:00
parent b9476cd96f
commit 6c317c1c13

View File

@ -71,6 +71,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
extern Bool noPanoramiXExtension;
#endif
extern Bool noXFree86DRIExtension;
static int DRIScreenPrivIndex = -1;
static int DRIWindowPrivIndex = -1;
static unsigned long DRIGeneration = 0;
@ -129,6 +131,13 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
DRIGeneration = serverGeneration;
}
/* If the DRI extension is disabled, do not initialize the DRI */
if (noXFree86DRIExtension) {
DRIDrvMsg(pScreen->myNum, X_WARNING,
"Direct rendering has been disabled.\n");
return FALSE;
}
/*
* If Xinerama is on, don't allow DRI to initialise. It won't be usable
* anyway.