aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/dri/target.c
blob: 01532e242b8db1ec8a520c6b13662f70cb639700 (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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#include "target-helpers/drm_helper.h"
#include "target-helpers/sw_helper.h"

#include "dri_screen.h"

#if defined(GALLIUM_SOFTPIPE)

const __DRIextension **__driDriverGetExtensions_swrast(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void)
{
   globalDriverAPI = &galliumsw_driver_api;
   return galliumsw_driver_extensions;
}

#if defined(HAVE_LIBDRM)

const __DRIextension **__driDriverGetExtensions_kms_swrast(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_kms_swrast(void)
{
   globalDriverAPI = &dri_kms_driver_api;
   return galliumdrm_driver_extensions;
}

#endif
#endif

#if defined(GALLIUM_I915)

const __DRIextension **__driDriverGetExtensions_i915(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_i915(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_ILO)

const __DRIextension **__driDriverGetExtensions_i965(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_i965(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_NOUVEAU)

const __DRIextension **__driDriverGetExtensions_nouveau(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_nouveau(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_R300)

const __DRIextension **__driDriverGetExtensions_r300(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_r300(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_R600)

const __DRIextension **__driDriverGetExtensions_r600(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_r600(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_RADEONSI)

const __DRIextension **__driDriverGetExtensions_radeonsi(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_radeonsi(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_VMWGFX)

const __DRIextension **__driDriverGetExtensions_vmwgfx(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_vmwgfx(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_FREEDRENO)

const __DRIextension **__driDriverGetExtensions_msm(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_msm(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}

const __DRIextension **__driDriverGetExtensions_kgsl(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_kgsl(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_VIRGL)

const __DRIextension **__driDriverGetExtensions_virtio_gpu(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_virtio_gpu(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif

#if defined(GALLIUM_VC4)

const __DRIextension **__driDriverGetExtensions_vc4(void);

PUBLIC const __DRIextension **__driDriverGetExtensions_vc4(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}

#if defined(USE_VC4_SIMULATOR)
const __DRIextension **__driDriverGetExtensions_i965(void);

/**
 * When building using the simulator (on x86), we advertise ourselves as the
 * i965 driver so that you can just make a directory with a link from
 * i965_dri.so to the built vc4_dri.so, and point LIBGL_DRIVERS_PATH to that
 * on your i965-using host to run the driver under simulation.
 *
 * This is, of course, incompatible with building with the ilo driver, but you
 * shouldn't be building that anyway.
 */
PUBLIC const __DRIextension **__driDriverGetExtensions_i965(void)
{
   globalDriverAPI = &galliumdrm_driver_api;
   return galliumdrm_driver_extensions;
}
#endif
#endif