dri: Emit a critical error if a named driver fails to load.
authorCarl Worth <cworth@cworth.org>
Sat, 4 Feb 2012 00:25:38 +0000 (16:25 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 9 Feb 2012 01:07:53 +0000 (17:07 -0800)
Something has gone wrong if we were asked to load a driver of a
specific name, but it failed to load for some reason. The user really
should be made aware of this, (and instructed to set LIBGL_DEBUG for
more details).

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
src/glx/dri2_glx.c
src/glx/dri_glx.c

index 10b6f525ea2378f2e0c56e7ffc836fbfcf61d203..b09606addde1bc8999b3a3a3e23740ad14dee49f 100644 (file)
@@ -1135,6 +1135,8 @@ dri2CreateScreen(int screen, struct glx_display * priv)
    return &psc->base;
 
 handle_error:
+   CriticalErrorMessageF("failed to load driver: %s\n", driverName);
+
    if (configs)
        glx_config_destroy_list(configs);
    if (visuals)
index 0cd7cca74fb108a27e363c55cd09251605ef33e3..9bfcb0c082a32869a58ab3c97d875397bd78e7ca 100644 (file)
@@ -916,6 +916,8 @@ driCreateScreen(int screen, struct glx_display *priv)
    return &psc->base;
 
 cleanup:
+   CriticalErrorMessageF("failed to load driver: %s\n", driverName);
+
    if (psc->driver)
       dlclose(psc->driver);
    glx_screen_cleanup(&psc->base);