glapi: add DISPATCH_FUNCTION_SIZE
authorTobias Jakobi <liquid.acid@gmx.net>
Sat, 27 Sep 2008 07:51:45 +0000 (08:51 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Sat, 27 Sep 2008 07:51:45 +0000 (08:51 +0100)
src/mesa/glapi/glapi.c

index c92b096f68ed333d4f6fe149c5108c2b8592349a..c3ebf60719f0d62339802a6510989ded57c69c26 100644 (file)
@@ -302,6 +302,20 @@ extern const GLubyte gl_dispatch_functions_start[];
 #endif /* USE_X86_ASM */
 
 
+#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)
+#  define DISPATCH_FUNCTION_SIZE  32
+# else
+#  define DISPATCH_FUNCTION_SIZE  16
+# endif
+#endif
+
+#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer)
+# define NEED_FUNCTION_POINTER
+#endif
+
 #if defined(PTHREADS) || defined(GLX_USE_TLS)
 /**
  * Perform platform-specific GL API entry-point fixups.