diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-12-17 00:24:27 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2011-01-20 17:15:50 +0800 |
commit | 97185bf2654f7e72d8bfcc216f905492655d4c77 (patch) | |
tree | 92a3f7e0ef7faa683270dd91df34390c0cc0b838 /src/mapi/mapi/u_current.h | |
parent | 96c52d16c1716b8974b5421342f53f36cb80c10f (diff) |
mapi: Add support for bridge mode.
In bridge mode, mapi no longer implements glapi.h. It becomes a user of
glapi.h. Imagine an app that uses both libGL.so and libGLESv2.so.
There will be two copies of glapi in the app's memory. It is possible
that _glapi_get_dispatch does not return what _glapi_set_dispatch set,
if they access different copies of the global variables. The solution
to this situation to build either one of the libraries as a bridge to
the other. Or build both libraries as bridges to another shared
glapi library.
Diffstat (limited to 'src/mapi/mapi/u_current.h')
-rw-r--r-- | src/mapi/mapi/u_current.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mapi/mapi/u_current.h b/src/mapi/mapi/u_current.h index bdd2df1125..f9cffd8c3d 100644 --- a/src/mapi/mapi/u_current.h +++ b/src/mapi/mapi/u_current.h @@ -1,7 +1,8 @@ #ifndef _U_CURRENT_H_ #define _U_CURRENT_H_ -#if defined(MAPI_MODE_UTIL) || defined(MAPI_MODE_GLAPI) +#if defined(MAPI_MODE_UTIL) || defined(MAPI_MODE_GLAPI) || \ + defined(MAPI_MODE_BRIDGE) #include "glapi/glapi.h" @@ -21,7 +22,7 @@ #define u_current_table_tsd _gl_DispatchTSD -#else /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI */ +#else /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */ #include "u_compiler.h" @@ -42,7 +43,7 @@ extern void *u_current_user; #endif /* GLX_USE_TLS */ -#endif /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI */ +#endif /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */ void u_current_init(void); |