diff options
author | Carl Worth <cworth@cworth.org> | 2012-02-03 16:25:38 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2012-02-08 17:07:53 -0800 |
commit | 26de5273acf1ebe6730b5e72b55b3bcceba167c6 (patch) | |
tree | 28c4b26ab668151af158d34b16ef2f92a5cbc5df /src | |
parent | 6c9af977401ff986964d678f8870eee23c504077 (diff) |
dri: Emit a critical error if the swrast driver fails to load.
Something has gone wrong if swrast is requested but cannot be
loaded. The user really should be made aware of this, (and instructed
to set LIBGL_DEBUG for more details).
The wording of this error message is updated from "reverting to
indirect rendering" to the more objectively descriptive "failed to
load driver: swrast". The former wording makes assumptions about what
the calling code will decide to do next, rather than simply describing
what went wrong within the current function. The new wording is
consistent with the critical errors recently added for hardware
drivers that fail to load.
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/glx/drisw_glx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 833ea7d4cc1..9cee25e932b 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -571,13 +571,15 @@ driswDestroyScreen(struct glx_screen *base) dlclose(psc->driver); } +#define SWRAST_DRIVER_NAME "swrast" + static void * driOpenSwrast(void) { void *driver = NULL; if (driver == NULL) - driver = driOpenDriver("swrast"); + driver = driOpenDriver(SWRAST_DRIVER_NAME); return driver; } @@ -702,7 +704,7 @@ driswCreateScreen(int screen, struct glx_display *priv) glx_screen_cleanup(&psc->base); Xfree(psc); - ErrorMessageF("reverting to indirect rendering\n"); + CriticalErrorMessageF("failed to load driver: %s\n", SWRAST_DRIVER_NAME); return NULL; } |