i965/vs: Allocate register set once at context creation.
[mesa.git] / src / mesa / drivers / dri / common / dri_test.c
index 6013c02ac5b42ac64f15a90c6fa023dea5a2f263..35732857dda816d97e064b1c2af68cf6f6c1d4f3 100644 (file)
@@ -17,11 +17,16 @@ PUBLIC __thread struct _glapi_table * _glapi_tls_Dispatch
 PUBLIC __thread void * _glapi_tls_Context
     __attribute__((tls_model("initial-exec")));
 
-#endif
-
 PUBLIC const struct _glapi_table *_glapi_Dispatch;
 PUBLIC const void *_glapi_Context;
 
+#else
+
+PUBLIC struct _glapi_table *_glapi_Dispatch;
+PUBLIC void *_glapi_Context;
+
+#endif
+
 PUBLIC void
 _glapi_check_multithread(void)
 {}
@@ -77,8 +82,10 @@ _glthread_GetID(void)
    return 0;
 }
 
+#ifndef NO_MAIN
 int main(int argc, char** argv)
 {
    void* p = __driDriverExtensions;
    return (int)(unsigned long)p;
 }
+#endif