summaryrefslogtreecommitdiffstats
path: root/src/mapi/glapi/glapi.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-03-13 10:20:29 -0600
committerBrian Paul <[email protected]>2015-03-18 09:01:50 -0600
commit201e36e77d6ca616f75f14d5f1c31f0062ae4366 (patch)
tree757c6cfd8dee3d9c6bac6a2c612f2da0c8299a47 /src/mapi/glapi/glapi.h
parentaee26d292f165438577426f5e62a62ec2a1514c9 (diff)
mapi: add new _glapi_new_nop_table() and _glapi_set_nop_handler()
_glapi_new_nop_table() creates a new dispatch table populated with pointers to no-op functions. _glapi_set_nop_handler() is used to register a callback function which will be called from each of the no-op functions. Now we always generate a separate no-op function for each GL entrypoint. This allows us to do proper stack clean-up for Windows __stdcall and lets us report the actual function name in error messages. Before this change, for non-Windows release builds we used a single no-op function for all entrypoints. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mapi/glapi/glapi.h')
-rw-r--r--src/mapi/glapi/glapi.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mapi/glapi/glapi.h b/src/mapi/glapi/glapi.h
index 8d991fb3b8a..673295bca46 100644
--- a/src/mapi/glapi/glapi.h
+++ b/src/mapi/glapi/glapi.h
@@ -80,6 +80,9 @@ extern "C" {
#endif
typedef void (*_glapi_proc)(void);
+
+typedef void (*_glapi_nop_handler_proc)(const char *name);
+
struct _glapi_table;
@@ -159,6 +162,14 @@ _GLAPI_EXPORT struct _glapi_table *
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix);
+_GLAPI_EXPORT void
+_glapi_set_nop_handler(_glapi_nop_handler_proc func);
+
+/** Return pointer to new dispatch table filled with no-op functions */
+_GLAPI_EXPORT struct _glapi_table *
+_glapi_new_nop_table(unsigned num_entries);
+
+
/** Deprecated function */
_GLAPI_EXPORT unsigned long
_glthread_GetID(void);