mesa: Remove GLES overlay.
[mesa.git] / src / gallium / targets / egl / egl.c
index 19404c8ef6da98533423560532536071046ee084..61fe5069e919c6edc857ee9fc1d979d9d6abe4a0 100644 (file)
@@ -205,19 +205,7 @@ get_st_api_full(enum st_api_type api, enum st_profile_type profile)
    switch (api) {
    case ST_API_OPENGL:
       symbol = ST_CREATE_OPENGL_SYMBOL;
-      switch (profile) {
-      case ST_PROFILE_OPENGL_ES1:
-         names[count++] = "GLESv1_CM";
-         names[count++] = "GL";
-         break;
-      case ST_PROFILE_OPENGL_ES2:
-         names[count++] = "GLESv2";
-         names[count++] = "GL";
-         break;
-      default:
-         names[count++] = "GL";
-         break;
-      }
+      names[count++] = "GL";
       break;
    case ST_API_OPENVG:
       symbol = ST_CREATE_OPENVG_SYMBOL;
@@ -237,6 +225,21 @@ get_st_api_full(enum st_api_type api, enum st_profile_type profile)
          break;
    }
 
+   /* try again with libGL.so loaded */
+   if (!stmod->stapi && api == ST_API_OPENGL) {
+      struct util_dl_library *glapi = util_dl_open("libGL" UTIL_DL_EXT);
+
+      if (glapi) {
+         _eglLog(_EGL_DEBUG, "retry with libGL" UTIL_DL_EXT " loaded");
+         /* skip the last name (which is NULL) */
+         for (i = 0; i < count - 1; i++) {
+            if (load_st_module(stmod, names[i], symbol))
+               break;
+         }
+         util_dl_close(glapi);
+      }
+   }
+
    if (!stmod->stapi) {
       EGLint level = (egl_g3d_loader.profile_masks[api]) ?
          _EGL_WARNING : _EGL_DEBUG;