summaryrefslogtreecommitdiffstats
path: root/src/mapi/table.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/table.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/table.h')
-rw-r--r--src/mapi/table.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mapi/table.h b/src/mapi/table.h
index e2d6ef03d76..a1af40c6fc1 100644
--- a/src/mapi/table.h
+++ b/src/mapi/table.h
@@ -41,6 +41,14 @@ struct mapi_table;
extern const mapi_func table_noop_array[];
+
+typedef void (*nop_handler_proc)(const char *name);
+
+
+void
+table_set_noop_handler(nop_handler_proc func);
+
+
/**
* Get the no-op dispatch table.
*/