DRI: Log something if we don't support legacy DRI
authorAndrew Deason <adeason@dson.org>
Wed, 14 Sep 2011 16:37:48 +0000 (18:37 +0200)
committerMichel Dänzer <michel@daenzer.net>
Wed, 14 Sep 2011 16:39:45 +0000 (18:39 +0200)
If we are called via the legacy DRI interface, and we don't support
legacy DRI (InitScreen is NULL), print a debug message, so it is easy
to see why the driver fails to initialize.

See https://bugs.freedesktop.org/show_bug.cgi?id=40437

src/mesa/drivers/dri/common/dri_util.c

index 6d6401934d9b09b8d6228ab39c5ab8ea7d9ee3c7..cdd413737adc5c3971df707e1757950ab6512916 100644 (file)
@@ -816,8 +816,10 @@ driCreateNewScreen(int scrn,
 
     (void) loaderPrivate;
 
-    if (driDriverAPI.InitScreen == NULL)
+    if (driDriverAPI.InitScreen == NULL) {
+       __driUtilMessage("driver does not support DRI1");
        return NULL;
+    }
 
     psp = calloc(1, sizeof *psp);
     if (!psp)