mapi: Improve comment about _glapi_tls_Dispatch and _glapi_tls_Context
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:
@@ -72,25 +72,17 @@ extern void (*__glapi_noop_table[])(void);
|
|||||||
*
|
*
|
||||||
* Depending on whether or not multithreading is support, and the type of
|
* Depending on whether or not multithreading is support, and the type of
|
||||||
* support available, several variables are used to store the current context
|
* support available, several variables are used to store the current context
|
||||||
* pointer and the current dispatch table pointer. In the non-threaded case,
|
* pointer and the current dispatch table pointer. In the non-threaded case,
|
||||||
* the variables \c _glapi_Dispatch and \c _glapi_Context are used for this
|
* the variables \c _glapi_Dispatch and \c _glapi_Context are used for this
|
||||||
* purpose.
|
* purpose.
|
||||||
*
|
*
|
||||||
* In the "normal" threaded case, the variables \c _glapi_Dispatch and
|
* In multi threaded case, The TLS variables \c _glapi_tls_Dispatch and
|
||||||
* \c _glapi_Context will be \c NULL if an application is detected as being
|
* \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and \c _glapi_Context
|
||||||
* multithreaded. Single-threaded applications will use \c _glapi_Dispatch
|
* be hardcoded to \c NULL maintains binary compatability between TLS enabled
|
||||||
* and \c _glapi_Context just like the case without any threading support.
|
* loaders and non-TLS DRI drivers. When \c _glapi_Dispatch and \c _glapi_Context
|
||||||
* When \c _glapi_Dispatch and \c _glapi_Context are \c NULL, the thread state
|
* are \c NULL, the thread state data \c ContextTSD are used. Drivers and the
|
||||||
* data \c _gl_DispatchTSD and \c ContextTSD are used. Drivers and the
|
|
||||||
* static dispatch functions access these variables via \c _glapi_get_dispatch
|
* static dispatch functions access these variables via \c _glapi_get_dispatch
|
||||||
* and \c _glapi_get_context.
|
* and \c _glapi_get_context.
|
||||||
*
|
|
||||||
*
|
|
||||||
* In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are
|
|
||||||
* hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and
|
|
||||||
* \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and
|
|
||||||
* \c _glapi_Context be hardcoded to \c NULL maintains binary compatability
|
|
||||||
* between TLS enabled loaders and non-TLS DRI drivers.
|
|
||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user