summaryrefslogtreecommitdiff
path: root/src/GLdispatch/GLdispatch.h
diff options
context:
space:
mode:
authorKyle Brenneman <kbrenneman@nvidia.com>2015-06-04 18:49:26 -0600
committerKyle Brenneman <kbrenneman@nvidia.com>2015-06-05 16:08:18 -0600
commitd39c400611a942ce6d397dcbb045d2d7424a4896 (patch)
tree223404a8b1d5cc077696178b0736fe979181ab09 /src/GLdispatch/GLdispatch.h
parent8e8f12f1f4c6d48e369fff3d550ef5b5644ee7c9 (diff)
libGLdispatch: Add a TSD key for the current context.
Add a glvnd_key_t key to GLdispatch.c to hold the current API state. __glDispatchGetCurrentAPIState and __glDispatchGetCurrentContext are now normal exported functions instead of wrappers around _glapi_get_current. Removed _glapi_get_current, _glapi_set_current, _glapi_get_context, _glapi_set_context, and their associated functions in u_current.c. Removed the U_CURRENT_* constants and replaced them with the corresponding GLAPI_CURRENT_* constants. Removed the GLAPI_CURRENT_* enums except for GLAPI_CURRENT_DISPATCH.
Diffstat (limited to 'src/GLdispatch/GLdispatch.h')
-rw-r--r--src/GLdispatch/GLdispatch.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/GLdispatch/GLdispatch.h b/src/GLdispatch/GLdispatch.h
index a63a3fc..2d0ea60 100644
--- a/src/GLdispatch/GLdispatch.h
+++ b/src/GLdispatch/GLdispatch.h
@@ -45,15 +45,6 @@
* library entrypoints.
*/
-/*
- * XXX: Kludge to export the get current function directly from glapi for
- * performance reasons.
- */
-#define CURRENT_CONTEXT 1 // GLAPI_CURRENT_CONTEXT
-#define CURRENT_API_STATE 2 // GLAPI_CURRENT_USER1
-
-PUBLIC void *_glapi_get_current(int index);
-
/* Namespaces for API state */
enum {
GLDISPATCH_API_GLX,
@@ -194,20 +185,14 @@ PUBLIC void __glDispatchLoseCurrent(void);
*
* This currently just hijacks _glapi_{set,get}_context() for this purpose.
*/
-static inline __GLdispatchAPIState *__glDispatchGetCurrentAPIState(void)
-{
- return _glapi_get_current(CURRENT_API_STATE);
-}
+PUBLIC __GLdispatchAPIState *__glDispatchGetCurrentAPIState(void);
/*!
* This gets the current (opaque) vendor library context pointer. If the pointer
* is NULL, no context is current, otherwsise the contents of the pointer
* depends on the vendor whose context is current.
*/
-static inline void *__glDispatchGetCurrentContext(void)
-{
- return _glapi_get_current(CURRENT_CONTEXT);
-}
+PUBLIC void *__glDispatchGetCurrentContext(void);
/*!
* This gets the "offset" of the given entrypoint in the GL dispatch table