mapi: Move shared stub into u_current.c

These stub are:
_glapi_Dispatch
_glapi_Context
_glapi_destroy_multithread
_glapi_check_multithread

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>
This commit is contained in:
Yonggang Luo 2022-07-27 16:11:42 +08:00 committed by Marge Bot
parent 7f49abbdc0
commit 8e8a231a07
3 changed files with 20 additions and 27 deletions

View file

@ -29,22 +29,11 @@
#include "u_current.h"
/*
* _glapi_Dispatch, _glapi_Context
* _glapi_tls_Dispatch, _glapi_tls_Context,
* _glapi_set_context, _glapi_get_context,
* _glapi_destroy_multithread, _glapi_check_multithread
* _glapi_set_dispatch, and _glapi_get_dispatch
* are defined in u_current.c.
*/
/* not used, but defined for compatibility */
const struct _glapi_table *_glapi_Dispatch;
const void *_glapi_Context;
void
_glapi_destroy_multithread(void)
{
}
void
_glapi_check_multithread(void)
{
}

View file

@ -34,26 +34,14 @@
#include "stub.h"
/*
* _glapi_Dispatch, _glapi_Context
* _glapi_tls_Dispatch, _glapi_tls_Context,
* _glapi_set_context, _glapi_get_context,
* _glapi_destroy_multithread, _glapi_check_multithread
* _glapi_set_dispatch, and _glapi_get_dispatch
* are defined in u_current.c.
*/
/* not used, but defined for compatibility */
const struct _glapi_table *_glapi_Dispatch;
const void *_glapi_Context;
void
_glapi_destroy_multithread(void)
{
}
void
_glapi_check_multithread(void)
{
}
/**
* Return size of dispatch table struct as number of functions (or
* slots).

View file

@ -99,8 +99,24 @@ __THREAD_INITIAL_EXEC struct _glapi_table *_glapi_tls_Dispatch
__THREAD_INITIAL_EXEC void *_glapi_tls_Context;
/* not used, but defined for compatibility */
const struct _glapi_table *_glapi_Dispatch;
const void *_glapi_Context;
/*@}*/
/* not used, but defined for compatibility */
void
_glapi_destroy_multithread(void)
{
}
/* not used, but defined for compatibility */
void
_glapi_check_multithread(void)
{
}
/**
* Set the current context pointer for this thread.
* The context pointer is an opaque type which should be cast to