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/entry_x86_tsd.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/entry_x86_tsd.h')
-rw-r--r-- | src/mapi/mapi/entry_x86_tsd.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mapi/mapi/entry_x86_tsd.h b/src/mapi/mapi/entry_x86_tsd.h index 38742e77dc..1491478d47 100644 --- a/src/mapi/mapi/entry_x86_tsd.h +++ b/src/mapi/mapi/entry_x86_tsd.h @@ -26,8 +26,6 @@ * Chia-I Wu <olv@lunarg.com> */ -#include <string.h> -#include "u_execmem.h" #include "u_macros.h" #define X86_ENTRY_SIZE 32 @@ -48,15 +46,20 @@ __asm__(".text\n" "je 1f\n\t" \ "jmp *(4 * " slot ")(%eax)\n" \ "1:\n\t" \ - "call u_current_get_internal\n\t"\ + "call " ENTRY_CURRENT_TABLE_GET "\n\t" \ "jmp *(4 * " slot ")(%eax)" #define MAPI_TMP_STUB_ASM_GCC #include "mapi_tmp.h" +#ifndef MAPI_MODE_BRIDGE + __asm__(".balign 32\n" "x86_entry_end:"); +#include <string.h> +#include "u_execmem.h" + void entry_patch_public(void) { @@ -96,3 +99,5 @@ entry_generate(int slot) return entry; } + +#endif /* MAPI_MODE_BRIDGE */ |