6013c02ac5b42ac64f15a90c6fa023dea5a2f263
[mesa.git] / src / mesa / drivers / dri / common / dri_test.c
1 #include "main/glheader.h"
2 #include "main/compiler.h"
3 #include "glapi/glapi.h"
4
5 /* This is just supposed to make sure we get a reference to
6 the driver entry symbol that the compiler doesn't optimize away */
7
8 extern char __driDriverExtensions[];
9
10 /* provide glapi symbols */
11
12 #if defined(GLX_USE_TLS)
13
14 PUBLIC __thread struct _glapi_table * _glapi_tls_Dispatch
15 __attribute__((tls_model("initial-exec")));
16
17 PUBLIC __thread void * _glapi_tls_Context
18 __attribute__((tls_model("initial-exec")));
19
20 #endif
21
22 PUBLIC const struct _glapi_table *_glapi_Dispatch;
23 PUBLIC const void *_glapi_Context;
24
25 PUBLIC void
26 _glapi_check_multithread(void)
27 {}
28
29 PUBLIC void
30 _glapi_set_context(void *context)
31 {}
32
33 PUBLIC void *
34 _glapi_get_context(void)
35 {
36 return 0;
37 }
38
39 PUBLIC void
40 _glapi_set_dispatch(struct _glapi_table *dispatch)
41 {}
42
43 PUBLIC struct _glapi_table *
44 _glapi_get_dispatch(void)
45 {
46 return 0;
47 }
48
49 PUBLIC int
50 _glapi_add_dispatch( const char * const * function_names,
51 const char * parameter_signature )
52 {
53 return 0;
54 }
55
56 PUBLIC GLint
57 _glapi_get_proc_offset(const char *funcName)
58 {
59 return 0;
60 }
61
62 PUBLIC _glapi_proc
63 _glapi_get_proc_address(const char *funcName)
64 {
65 return 0;
66 }
67
68 PUBLIC GLuint
69 _glapi_get_dispatch_table_size(void)
70 {
71 return 0;
72 }
73
74 PUBLIC unsigned long
75 _glthread_GetID(void)
76 {
77 return 0;
78 }
79
80 int main(int argc, char** argv)
81 {
82 void* p = __driDriverExtensions;
83 return (int)(unsigned long)p;
84 }