Merge remote branch 'origin/7.8'
[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 PUBLIC const struct _glapi_table *_glapi_Dispatch;
21 PUBLIC const void *_glapi_Context;
22
23 #else
24
25 PUBLIC struct _glapi_table *_glapi_Dispatch;
26 PUBLIC void *_glapi_Context;
27
28 #endif
29
30 PUBLIC void
31 _glapi_check_multithread(void)
32 {}
33
34 PUBLIC void
35 _glapi_set_context(void *context)
36 {}
37
38 PUBLIC void *
39 _glapi_get_context(void)
40 {
41 return 0;
42 }
43
44 PUBLIC void
45 _glapi_set_dispatch(struct _glapi_table *dispatch)
46 {}
47
48 PUBLIC struct _glapi_table *
49 _glapi_get_dispatch(void)
50 {
51 return 0;
52 }
53
54 PUBLIC int
55 _glapi_add_dispatch( const char * const * function_names,
56 const char * parameter_signature )
57 {
58 return 0;
59 }
60
61 PUBLIC GLint
62 _glapi_get_proc_offset(const char *funcName)
63 {
64 return 0;
65 }
66
67 PUBLIC _glapi_proc
68 _glapi_get_proc_address(const char *funcName)
69 {
70 return 0;
71 }
72
73 PUBLIC GLuint
74 _glapi_get_dispatch_table_size(void)
75 {
76 return 0;
77 }
78
79 PUBLIC unsigned long
80 _glthread_GetID(void)
81 {
82 return 0;
83 }
84
85 int main(int argc, char** argv)
86 {
87 void* p = __driDriverExtensions;
88 return (int)(unsigned long)p;
89 }