dri_test.c revision 5f229547a525554ded621f4f245e22c9090e9205
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
8extern char __driDriverExtensions[];
9
10/* provide glapi symbols */
11
12#if defined(GLX_USE_TLS)
13
14PUBLIC __thread struct _glapi_table * _glapi_tls_Dispatch
15    __attribute__((tls_model("initial-exec")));
16
17PUBLIC __thread void * _glapi_tls_Context
18    __attribute__((tls_model("initial-exec")));
19
20#endif
21
22PUBLIC const struct _glapi_table *_glapi_Dispatch;
23PUBLIC const void *_glapi_Context;
24
25PUBLIC void
26_glapi_check_multithread(void)
27{}
28
29PUBLIC void
30_glapi_set_context(void *context)
31{}
32
33PUBLIC void *
34_glapi_get_context(void)
35{
36	return 0;
37}
38
39PUBLIC void
40_glapi_set_dispatch(struct _glapi_table *dispatch)
41{}
42
43PUBLIC struct _glapi_table *
44_glapi_get_dispatch(void)
45{
46	return 0;
47}
48
49PUBLIC int
50_glapi_add_dispatch( const char * const * function_names,
51		     const char * parameter_signature )
52{
53	return 0;
54}
55
56PUBLIC GLint
57_glapi_get_proc_offset(const char *funcName)
58{
59	return 0;
60}
61
62PUBLIC _glapi_proc
63_glapi_get_proc_address(const char *funcName)
64{
65	return 0;
66}
67
68PUBLIC GLuint
69_glapi_get_dispatch_table_size(void)
70{
71	return 0;
72}
73
74PUBLIC unsigned long
75_glthread_GetID(void)
76{
77   return 0;
78}
79
80int main(int argc, char** argv)
81{
82   void* p = __driDriverExtensions;
83   return (int)(unsigned long)p;
84}
85