diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-06-28 15:16:35 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-06-28 15:16:35 +1000 |
commit | e81c9a29e6d1c6573892df8601f0361c2b09c659 (patch) | |
tree | 9ee010c3bcc6597720b812bab96ff9174cea8047 | |
parent | fce3edda42d10a9c3249c6eae4218a51a981493f (diff) | |
download | xorg-driver-xf86-video-nouveau-e81c9a29e6d1c6573892df8601f0361c2b09c659.tar.gz |
Bail if GlxSetVisualConfigs isn't found.
-rw-r--r-- | src/nv_dri.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nv_dri.c b/src/nv_dri.c index 857fb42..a489e68 100644 --- a/src/nv_dri.c +++ b/src/nv_dri.c @@ -257,6 +257,19 @@ Bool NVDRIGetVersion(ScrnInfoPtr pScrn) return TRUE; } +Bool NVDRICheckModules(ScrnInfoPtr pScrn) +{ + if (!xf86LoaderCheckSymbol("GlxSetVisualConfigs")) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "[dri] GlxSetVisualConfigs not found.\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + " NVIDIA's glx present, or glx not loaded.\n"); + return FALSE; + } + + return TRUE; +} + Bool NVDRIScreenInit(ScrnInfoPtr pScrn) { DRIInfoPtr pDRIInfo; @@ -267,6 +280,9 @@ Bool NVDRIScreenInit(ScrnInfoPtr pScrn) int drm_page_size; int irq; + if (!NVDRICheckModules(pScrn)) + return FALSE; + drm_page_size = getpagesize(); if (!(pDRIInfo = DRICreateInfoRec())) return FALSE; |