summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common/dri_test.c
blob: 35732857dda816d97e064b1c2af68cf6f6c1d4f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include "main/glheader.h"
#include "main/compiler.h"
#include "glapi/glapi.h"

/* This is just supposed to make sure we get a reference to
   the driver entry symbol that the compiler doesn't optimize away */

extern char __driDriverExtensions[];

/* provide glapi symbols */

#if defined(GLX_USE_TLS)

PUBLIC __thread struct _glapi_table * _glapi_tls_Dispatch
    __attribute__((tls_model("initial-exec")));

PUBLIC __thread void * _glapi_tls_Context
    __attribute__((tls_model("initial-exec")));

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)
{}

PUBLIC void
_glapi_set_context(void *context)
{}

PUBLIC void *
_glapi_get_context(void)
{
	return 0;
}

PUBLIC void
_glapi_set_dispatch(struct _glapi_table *dispatch)
{}

PUBLIC struct _glapi_table *
_glapi_get_dispatch(void)
{
	return 0;
}

PUBLIC int
_glapi_add_dispatch( const char * const * function_names,
		     const char * parameter_signature )
{
	return 0;
}

PUBLIC GLint
_glapi_get_proc_offset(const char *funcName)
{
	return 0;
}

PUBLIC _glapi_proc
_glapi_get_proc_address(const char *funcName)
{
	return 0;
}

PUBLIC GLuint
_glapi_get_dispatch_table_size(void)
{
	return 0;
}

PUBLIC unsigned long
_glthread_GetID(void)
{
   return 0;
}

#ifndef NO_MAIN
int main(int argc, char** argv)
{
   void* p = __driDriverExtensions;
   return (int)(unsigned long)p;
}
#endif