From 6c317c1c1323bd11292f8f9f179d75c96a18e616 Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Wed, 8 Dec 2004 05:52:20 +0000 Subject: [PATCH] =?UTF-8?q?//bugs.freedesktop.org/show=5Fbug.cgi=3Fid=3D13?= =?UTF-8?q?61)=20attachment=20#1287=20=20=20=20=20(https://bugs.freedeskto?= =?UTF-8?q?p.org/attachment.cgi=3Fid=3D1287):=20Avoid=20DRI=20=20=20=20=20?= =?UTF-8?q?initalisation=20when=20the=20Xfree86-DRI=20extension=20was=20tu?= =?UTF-8?q?rned=20off.=20Patch=20by=20=20=20=20=20Kristian=20H=F8gsberg=20?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw/xfree86/dri/dri.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index 4748f17df..0a631782d 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -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.