diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-06-29 14:58:33 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-06-29 17:16:20 +0800 |
commit | d5ab243d5a5bacbd2ba615d40f13c8ab37364745 (patch) | |
tree | bbf3c92d3c512e0d12eab3a7036c60c8e2cf7171 /src/gallium/state_trackers/egl/common/egl_g3d_api.c | |
parent | d8e0e114567ec19fd59f974080a418dc959cc9b6 (diff) |
st/egl: Move module loading code to targets.
Several changes are made. libegl.a no longer defines _eglMain. It
defines functions to create and destroy a _EGLDriver instead. The
creation function is called by the targets. It takes an egl_g3d_loader
as its argument. The loader is defined by the targets and is in charge
of creating st_api and pipe_screen. This allows us to move the module
loading code to targets. Lastly, the modules are now loaded as the
respective contexts are created.
Diffstat (limited to 'src/gallium/state_trackers/egl/common/egl_g3d_api.c')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d_api.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c index 255a1fb730..308fa96d99 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c @@ -35,6 +35,7 @@ #include "egl_g3d_api.h" #include "egl_g3d_image.h" #include "egl_g3d_st.h" +#include "egl_g3d_loader.h" #include "native.h" /** @@ -44,7 +45,6 @@ static struct st_api * egl_g3d_choose_st(_EGLDriver *drv, _EGLContext *ctx) { struct egl_g3d_driver *gdrv = egl_g3d_driver(drv); - struct st_api *stapi; EGLint idx = -1; switch (ctx->ClientAPI) { @@ -73,8 +73,7 @@ egl_g3d_choose_st(_EGLDriver *drv, _EGLContext *ctx) break; } - stapi = (idx >= 0) ? gdrv->stapis[idx] : NULL; - return stapi; + return (idx >= 0) ? gdrv->loader->get_st_api(idx) : NULL; } static _EGLContext * |