summaryrefslogtreecommitdiff
path: root/src/mesa/glapi/glapi_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/glapi/glapi_priv.h')
-rw-r--r--src/mesa/glapi/glapi_priv.h39
1 files changed, 35 insertions, 4 deletions
diff --git a/src/mesa/glapi/glapi_priv.h b/src/mesa/glapi/glapi_priv.h
index 7cd81ee8dc..0e2de460f2 100644
--- a/src/mesa/glapi/glapi_priv.h
+++ b/src/mesa/glapi/glapi_priv.h
@@ -28,6 +28,9 @@
#include "glthread.h"
+
+/* getproc */
+
extern void
_glapi_check_table_not_null(const struct _glapi_table *table);
@@ -36,6 +39,14 @@ extern void
_glapi_check_table(const struct _glapi_table *table);
+/* execmem */
+
+extern void *
+_glapi_exec_malloc(GLuint size);
+
+
+/* entrypoint */
+
extern void
init_glapi_relocs_once(void);
@@ -52,15 +63,35 @@ extern _glapi_proc
get_entrypoint_address(GLuint functionOffset);
-#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-#elif defined(USE_X86_ASM)
-# if defined(THREADS) && !defined(GLX_USE_TLS)
+/**
+ * Size (in bytes) of dispatch function (entrypoint).
+ */
+#if defined(USE_X86_ASM)
+# if defined(GLX_USE_TLS)
+# define DISPATCH_FUNCTION_SIZE 16
+# elif defined(THREADS)
# define DISPATCH_FUNCTION_SIZE 32
# else
# define DISPATCH_FUNCTION_SIZE 16
# endif
#endif
+#if defined(USE_X64_64_ASM)
+# if defined(GLX_USE_TLS)
+# define DISPATCH_FUNCTION_SIZE 16
+# endif
+#endif
+
+
+/**
+ * Number of extension functions which we can dynamically add at runtime.
+ *
+ * Number of extension functions is also subject to the size of backing exec
+ * mem we allocate. For the common case of dispatch stubs with size 16 bytes,
+ * the two limits will be hit simultaneously. For larger dispatch function
+ * sizes, MAX_EXTENSION_FUNCS is effectively reduced.
+ */
+#define MAX_EXTENSION_FUNCS 256
+
#endif