glapi: this one should be by THREAD
authorGeorge Sapountzis <gsapountzis@gmail.com>
Thu, 11 Mar 2010 16:04:03 +0000 (18:04 +0200)
committerGeorge Sapountzis <gsapountzis@gmail.com>
Sun, 14 Mar 2010 20:24:26 +0000 (22:24 +0200)
src/mesa/glapi/glapi_entrypoint.c

index 9bc38783541bc3e8b7755a50fb9014cb7ddb5358..3256867b1679bf7ba80c988984ad3a578d230b6c 100644 (file)
@@ -126,15 +126,13 @@ fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
 {
    GLubyte * const code = (GLubyte *) entrypoint;
 
-#if DISPATCH_FUNCTION_SIZE == 32
+#if defined(GLX_USE_TLS)
+   *((unsigned int *)(code +  8)) = 4 * offset;
+#elif defined(THREADS)
    *((unsigned int *)(code + 11)) = 4 * offset;
    *((unsigned int *)(code + 22)) = 4 * offset;
-#elif DISPATCH_FUNCTION_SIZE == 16 && defined( GLX_USE_TLS )
-   *((unsigned int *)(code +  8)) = 4 * offset;
-#elif DISPATCH_FUNCTION_SIZE == 16
-   *((unsigned int *)(code +  7)) = 4 * offset;
 #else
-# error Invalid DISPATCH_FUNCTION_SIZE!
+   *((unsigned int *)(code +  7)) = 4 * offset;
 #endif
 }