Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / mesa / glapi / glapi.c
index c92b096f68ed333d4f6fe149c5108c2b8592349a..9b5144a88b6a16a61dde005b491872e1a293f382 100644 (file)
@@ -98,6 +98,7 @@ _glapi_set_warning_func( _glapi_warning_func func )
 static GLboolean
 warn(void)
 {
+#if !defined(_WIN32_WCE)
    if ((WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"))
        && warning_func) {
       return GL_TRUE;
@@ -105,6 +106,9 @@ warn(void)
    else {
       return GL_FALSE;
    }
+#else
+   return GL_FALSE;
+#endif
 }
 
 
@@ -302,6 +306,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.