egl: Mention if swrast is being forced
[mesa.git] / src / egl / main / egldriver.c
index e719b19a63f383d082b44e541d7103a35f06ab95..526de02e53b66dc26eff6400533ad1c84008ac8a 100644 (file)
@@ -56,8 +56,10 @@ _eglGetDriver(void)
 
    if (!_eglDriver) {
       _eglDriver = calloc(1, sizeof(*_eglDriver));
-      if (!_eglDriver)
+      if (!_eglDriver) {
+         mtx_unlock(&_eglModuleMutex);
          return NULL;
+      }
       _eglInitDriver(_eglDriver);
    }
 
@@ -90,6 +92,8 @@ _eglMatchDriver(_EGLDisplay *disp)
    /* set options */
    disp->Options.ForceSoftware =
       env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
+   if (disp->Options.ForceSoftware)
+      _eglLog(_EGL_DEBUG, "Found 'LIBGL_ALWAYS_SOFTWARE' set, will use a CPU renderer");
 
    best_drv = _eglMatchAndInitialize(disp);
    if (!best_drv && !disp->Options.ForceSoftware) {