Mesa (master): st/egl: drop guess_gl_api from egl_g3d_loader

Chia-I Wu olv at kemper.freedesktop.org
Fri Jun 24 03:25:09 UTC 2011


Module: Mesa
Branch: master
Commit: 45aecf01144341fa1c536f6d5131ae36c374066e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=45aecf01144341fa1c536f6d5131ae36c374066e

Author: Chia-I Wu <olv at lunarg.com>
Date:   Fri Jun 24 12:13:02 2011 +0900

st/egl: drop guess_gl_api from egl_g3d_loader

It is not used and confusing.

---

 .../state_trackers/egl/common/egl_g3d_loader.h     |    1 -
 src/gallium/targets/egl-static/egl.c               |    7 ----
 src/gallium/targets/egl/egl.c                      |   31 +-------------------
 3 files changed, 1 insertions(+), 38 deletions(-)

diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_loader.h b/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
index 78bfe21..e9403fa 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
@@ -39,7 +39,6 @@ struct sw_winsys;
 struct egl_g3d_loader {
    uint profile_masks[ST_API_COUNT];
    struct st_api *(*get_st_api)(enum st_api_type api);
-   struct st_api *(*guess_gl_api)(enum st_profile_type profile);
 
    struct pipe_screen *(*create_drm_screen)(const char *name, int fd);
    struct pipe_screen *(*create_sw_screen)(struct sw_winsys *ws);
diff --git a/src/gallium/targets/egl-static/egl.c b/src/gallium/targets/egl-static/egl.c
index e617ff5..7e926cf 100644
--- a/src/gallium/targets/egl-static/egl.c
+++ b/src/gallium/targets/egl-static/egl.c
@@ -52,12 +52,6 @@ get_st_api(enum st_api_type api)
    return stmod->stapi;
 }
 
-static struct st_api *
-guess_gl_api(enum st_profile_type profile)
-{
-   return get_st_api(ST_API_OPENGL);
-}
-
 static struct pipe_screen *
 create_drm_screen(const char *name, int fd)
 {
@@ -79,7 +73,6 @@ loader_init(void)
       egl_g3d_loader.profile_masks[i] = egl_st_get_profile_mask(i);
 
    egl_g3d_loader.get_st_api = get_st_api;
-   egl_g3d_loader.guess_gl_api = guess_gl_api;
    egl_g3d_loader.create_drm_screen = create_drm_screen;
    egl_g3d_loader.create_sw_screen = create_sw_screen;
 
diff --git a/src/gallium/targets/egl/egl.c b/src/gallium/targets/egl/egl.c
index 3467aea..e13303c 100644
--- a/src/gallium/targets/egl/egl.c
+++ b/src/gallium/targets/egl/egl.c
@@ -199,7 +199,7 @@ load_pipe_module(struct pipe_module *pmod, const char *name)
 }
 
 static struct st_api *
-get_st_api_full(enum st_api_type api, enum st_profile_type profile)
+get_st_api(enum st_api_type api)
 {
    struct st_module *stmod = &st_modules[api];
    const char *names[8], *symbol;
@@ -257,34 +257,6 @@ get_st_api_full(enum st_api_type api, enum st_profile_type profile)
    return stmod->stapi;
 }
 
-static struct st_api *
-get_st_api(enum st_api_type api)
-{
-   enum st_profile_type profile = ST_PROFILE_DEFAULT;
-
-   /* determine the profile from the linked libraries */
-   if (api == ST_API_OPENGL) {
-      struct util_dl_library *self;
-
-      self = util_dl_open(NULL);
-      if (self) {
-         if (util_dl_get_proc_address(self, "glColor4x"))
-            profile = ST_PROFILE_OPENGL_ES1;
-         else if (util_dl_get_proc_address(self, "glShaderBinary"))
-            profile = ST_PROFILE_OPENGL_ES2;
-         util_dl_close(self);
-      }
-   }
-
-   return get_st_api_full(api, profile);
-}
-
-static struct st_api *
-guess_gl_api(enum st_profile_type profile)
-{
-   return get_st_api_full(ST_API_OPENGL, profile);
-}
-
 static struct pipe_module *
 get_pipe_module(const char *name)
 {
@@ -419,7 +391,6 @@ loader_init(void)
 #endif
 
    egl_g3d_loader.get_st_api = get_st_api;
-   egl_g3d_loader.guess_gl_api = guess_gl_api;
    egl_g3d_loader.create_drm_screen = create_drm_screen;
    egl_g3d_loader.create_sw_screen = create_sw_screen;
 




More information about the mesa-commit mailing list