• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
_glapi_check_multithread(void)31 _glapi_check_multithread(void)
32 {}
33 
34 PUBLIC void
_glapi_set_context(void * context)35 _glapi_set_context(void *context)
36 {}
37 
38 PUBLIC void *
_glapi_get_context(void)39 _glapi_get_context(void)
40 {
41 	return 0;
42 }
43 
44 PUBLIC void
_glapi_set_dispatch(struct _glapi_table * dispatch)45 _glapi_set_dispatch(struct _glapi_table *dispatch)
46 {}
47 
48 PUBLIC struct _glapi_table *
_glapi_get_dispatch(void)49 _glapi_get_dispatch(void)
50 {
51 	return 0;
52 }
53 
54 PUBLIC int
_glapi_add_dispatch(const char * const * function_names,const char * parameter_signature)55 _glapi_add_dispatch( const char * const * function_names,
56 		     const char * parameter_signature )
57 {
58 	return 0;
59 }
60 
61 PUBLIC GLint
_glapi_get_proc_offset(const char * funcName)62 _glapi_get_proc_offset(const char *funcName)
63 {
64 	return 0;
65 }
66 
67 PUBLIC _glapi_proc
_glapi_get_proc_address(const char * funcName)68 _glapi_get_proc_address(const char *funcName)
69 {
70 	return 0;
71 }
72 
73 PUBLIC GLuint
_glapi_get_dispatch_table_size(void)74 _glapi_get_dispatch_table_size(void)
75 {
76 	return 0;
77 }
78 
79 PUBLIC unsigned long
_glthread_GetID(void)80 _glthread_GetID(void)
81 {
82    return 0;
83 }
84 
main(int argc,char ** argv)85 int main(int argc, char** argv)
86 {
87    void* p = __driDriverExtensions;
88    return (int)(unsigned long)p;
89 }
90