summaryrefslogtreecommitdiff
path: root/src/nv_dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nv_dri.c')
-rw-r--r--src/nv_dri.c16
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;