[Mesa-dev] [Patch v2 3/4] dri: Emit a critical error if a named driver fails to load.
Carl Worth
cworth at cworth.org
Mon Feb 6 15:14:57 PST 2012
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).
---
src/glx/dri2_glx.c | 2 ++
src/glx/dri_glx.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 10b6f52..b09606a 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -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)
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 0cd7cca..9bfcb0c 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -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);
--
1.7.8.3
More information about the mesa-dev
mailing list