mapi: Add mapi and share the code with glapi.
Specifically, move all or most of
glapi/glapi.c to mapi/u_current.c,
glapi/glapi_execmem.c to mapi/u_execmem.c,
glapi/glthread.[ch] to mapi/u_thread.[ch]
and remove their dependencies on core Mesa headers.
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "glapi/glapi.h"
|
||||
#include "glapi/glapi_priv.h"
|
||||
#include "mapi/u_execmem.h"
|
||||
|
||||
|
||||
#ifdef USE_X86_ASM
|
||||
@@ -105,7 +106,7 @@ generate_entrypoint(unsigned int functionOffset)
|
||||
*/
|
||||
const GLubyte * const template_func = gl_dispatch_functions_start
|
||||
+ (DISPATCH_FUNCTION_SIZE * 32);
|
||||
GLubyte * const code = (GLubyte *) _glapi_exec_malloc(DISPATCH_FUNCTION_SIZE);
|
||||
GLubyte * const code = (GLubyte *) u_execmem_alloc(DISPATCH_FUNCTION_SIZE);
|
||||
|
||||
|
||||
if ( code != NULL ) {
|
||||
@@ -288,7 +289,7 @@ generate_entrypoint(GLuint functionOffset)
|
||||
extern unsigned int __glapi_sparc_pthread_stub;
|
||||
unsigned long call_dest = (unsigned long ) &__glapi_sparc_pthread_stub;
|
||||
#endif
|
||||
unsigned int *code = (unsigned int *) _glapi_exec_malloc(sizeof(template));
|
||||
unsigned int *code = (unsigned int *) u_execmem_alloc(sizeof(template));
|
||||
if (code) {
|
||||
code[0] = template[0] | (functionOffset & 0x3fffff);
|
||||
code[1] = template[1];
|
||||
|
||||
Reference in New Issue
Block a user