diff options
Diffstat (limited to 'meta/recipes-graphics/mesa/mesa-9.1.6/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch')
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-9.1.6/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch | 362 |
1 files changed, 362 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-9.1.6/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch b/meta/recipes-graphics/mesa/mesa-9.1.6/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch new file mode 100644 index 0000000000..30a3d98758 --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-9.1.6/0003-EGL-Mutate-NativeDisplayType-depending-on-config.patch | |||
@@ -0,0 +1,362 @@ | |||
1 | From 06c1ba29de8a26fffb73ee99f0fc54c704e9fee4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Stone <daniel@fooishbar.org> | ||
3 | Date: Fri, 24 May 2013 17:20:27 +0100 | ||
4 | Subject: [PATCH 3/5] EGL: Mutate NativeDisplayType depending on config | ||
5 | |||
6 | If we go through ./configure without enabling X11 anywhere, then set the | ||
7 | fallback types for EGL NativeDisplay and friends, rather than assuming | ||
8 | X11/Xlib. | ||
9 | |||
10 | Upstream-Status: Backport (slightly different solution was applied in master | ||
11 | https://bugs.freedesktop.org/show_bug.cgi?id=64959) | ||
12 | |||
13 | Signed-off-by: Daniel Stone <daniel@fooishbar.org> | ||
14 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
15 | --- | ||
16 | configure.ac | 9 +++ | ||
17 | include/EGL/eglplatform.h | 146 ------------------------------------------- | ||
18 | include/EGL/eglplatform.h.in | 146 +++++++++++++++++++++++++++++++++++++++++++ | ||
19 | 3 files changed, 155 insertions(+), 146 deletions(-) | ||
20 | delete mode 100644 include/EGL/eglplatform.h | ||
21 | create mode 100644 include/EGL/eglplatform.h.in | ||
22 | |||
23 | diff --git a/configure.ac b/configure.ac | ||
24 | index 2b4a374..d4c7a95 100644 | ||
25 | --- a/configure.ac | ||
26 | +++ b/configure.ac | ||
27 | @@ -1565,12 +1565,20 @@ fi | ||
28 | |||
29 | EGL_PLATFORMS="$egl_platforms" | ||
30 | |||
31 | +if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then | ||
32 | + MESA_EGL_NO_X11_HEADERS=0 | ||
33 | +else | ||
34 | + MESA_EGL_NO_X11_HEADERS=1 | ||
35 | +fi | ||
36 | + | ||
37 | AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1) | ||
38 | AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND, echo "$egl_platforms" | grep 'wayland' >/dev/null 2>&1) | ||
39 | AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep 'drm' >/dev/null 2>&1) | ||
40 | AM_CONDITIONAL(HAVE_EGL_PLATFORM_FBDEV, echo "$egl_platforms" | grep 'fbdev' >/dev/null 2>&1) | ||
41 | AM_CONDITIONAL(HAVE_EGL_PLATFORM_NULL, echo "$egl_platforms" | grep 'null' >/dev/null 2>&1) | ||
42 | |||
43 | +AC_SUBST([MESA_EGL_NO_X11_HEADERS]) | ||
44 | + | ||
45 | AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x") | ||
46 | AM_CONDITIONAL(HAVE_EGL_DRIVER_GLX, test "x$HAVE_EGL_DRIVER_GLX" != "x") | ||
47 | |||
48 | @@ -2042,6 +2050,7 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS" | ||
49 | |||
50 | dnl Substitute the config | ||
51 | AC_CONFIG_FILES([Makefile | ||
52 | + include/EGL/eglplatform.h | ||
53 | src/Makefile | ||
54 | src/egl/Makefile | ||
55 | src/egl/drivers/Makefile | ||
56 | diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h | ||
57 | deleted file mode 100644 | ||
58 | index 17fdc61..0000000 | ||
59 | --- a/include/EGL/eglplatform.h | ||
60 | +++ /dev/null | ||
61 | @@ -1,146 +0,0 @@ | ||
62 | -#ifndef __eglplatform_h_ | ||
63 | -#define __eglplatform_h_ | ||
64 | - | ||
65 | -/* | ||
66 | -** Copyright (c) 2007-2009 The Khronos Group Inc. | ||
67 | -** | ||
68 | -** Permission is hereby granted, free of charge, to any person obtaining a | ||
69 | -** copy of this software and/or associated documentation files (the | ||
70 | -** "Materials"), to deal in the Materials without restriction, including | ||
71 | -** without limitation the rights to use, copy, modify, merge, publish, | ||
72 | -** distribute, sublicense, and/or sell copies of the Materials, and to | ||
73 | -** permit persons to whom the Materials are furnished to do so, subject to | ||
74 | -** the following conditions: | ||
75 | -** | ||
76 | -** The above copyright notice and this permission notice shall be included | ||
77 | -** in all copies or substantial portions of the Materials. | ||
78 | -** | ||
79 | -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
80 | -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
81 | -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
82 | -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
83 | -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
84 | -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
85 | -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. | ||
86 | -*/ | ||
87 | - | ||
88 | -/* Platform-specific types and definitions for egl.h | ||
89 | - * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ | ||
90 | - * | ||
91 | - * Adopters may modify khrplatform.h and this file to suit their platform. | ||
92 | - * You are encouraged to submit all modifications to the Khronos group so that | ||
93 | - * they can be included in future versions of this file. Please submit changes | ||
94 | - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) | ||
95 | - * by filing a bug against product "EGL" component "Registry". | ||
96 | - */ | ||
97 | - | ||
98 | -#include <KHR/khrplatform.h> | ||
99 | - | ||
100 | -/* Macros used in EGL function prototype declarations. | ||
101 | - * | ||
102 | - * EGL functions should be prototyped as: | ||
103 | - * | ||
104 | - * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); | ||
105 | - * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); | ||
106 | - * | ||
107 | - * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h | ||
108 | - */ | ||
109 | - | ||
110 | -#ifndef EGLAPI | ||
111 | -#define EGLAPI KHRONOS_APICALL | ||
112 | -#endif | ||
113 | - | ||
114 | -#ifndef EGLAPIENTRY | ||
115 | -#define EGLAPIENTRY KHRONOS_APIENTRY | ||
116 | -#endif | ||
117 | -#define EGLAPIENTRYP EGLAPIENTRY* | ||
118 | - | ||
119 | -/* The types NativeDisplayType, NativeWindowType, and NativePixmapType | ||
120 | - * are aliases of window-system-dependent types, such as X Display * or | ||
121 | - * Windows Device Context. They must be defined in platform-specific | ||
122 | - * code below. The EGL-prefixed versions of Native*Type are the same | ||
123 | - * types, renamed in EGL 1.3 so all types in the API start with "EGL". | ||
124 | - * | ||
125 | - * Khronos STRONGLY RECOMMENDS that you use the default definitions | ||
126 | - * provided below, since these changes affect both binary and source | ||
127 | - * portability of applications using EGL running on different EGL | ||
128 | - * implementations. | ||
129 | - */ | ||
130 | - | ||
131 | -#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ | ||
132 | -#ifndef WIN32_LEAN_AND_MEAN | ||
133 | -#define WIN32_LEAN_AND_MEAN 1 | ||
134 | -#endif | ||
135 | -#include <windows.h> | ||
136 | - | ||
137 | -typedef HDC EGLNativeDisplayType; | ||
138 | -typedef HBITMAP EGLNativePixmapType; | ||
139 | -typedef HWND EGLNativeWindowType; | ||
140 | - | ||
141 | -#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ | ||
142 | - | ||
143 | -typedef int EGLNativeDisplayType; | ||
144 | -typedef void *EGLNativeWindowType; | ||
145 | -typedef void *EGLNativePixmapType; | ||
146 | - | ||
147 | -#elif defined(WL_EGL_PLATFORM) | ||
148 | - | ||
149 | -typedef struct wl_display *EGLNativeDisplayType; | ||
150 | -typedef struct wl_egl_pixmap *EGLNativePixmapType; | ||
151 | -typedef struct wl_egl_window *EGLNativeWindowType; | ||
152 | - | ||
153 | -#elif defined(__GBM__) | ||
154 | - | ||
155 | -typedef struct gbm_device *EGLNativeDisplayType; | ||
156 | -typedef struct gbm_bo *EGLNativePixmapType; | ||
157 | -typedef void *EGLNativeWindowType; | ||
158 | - | ||
159 | -#elif defined(ANDROID) /* Android */ | ||
160 | - | ||
161 | -struct ANativeWindow; | ||
162 | -struct egl_native_pixmap_t; | ||
163 | - | ||
164 | -typedef struct ANativeWindow *EGLNativeWindowType; | ||
165 | -typedef struct egl_native_pixmap_t *EGLNativePixmapType; | ||
166 | -typedef void *EGLNativeDisplayType; | ||
167 | - | ||
168 | -#elif defined(__unix__) | ||
169 | - | ||
170 | -#ifdef MESA_EGL_NO_X11_HEADERS | ||
171 | - | ||
172 | -typedef void *EGLNativeDisplayType; | ||
173 | -typedef khronos_uint32_t EGLNativePixmapType; | ||
174 | -typedef khronos_uint32_t EGLNativeWindowType; | ||
175 | - | ||
176 | -#else | ||
177 | - | ||
178 | -/* X11 (tentative) */ | ||
179 | -#include <X11/Xlib.h> | ||
180 | -#include <X11/Xutil.h> | ||
181 | - | ||
182 | -typedef Display *EGLNativeDisplayType; | ||
183 | -typedef Pixmap EGLNativePixmapType; | ||
184 | -typedef Window EGLNativeWindowType; | ||
185 | - | ||
186 | -#endif /* MESA_EGL_NO_X11_HEADERS */ | ||
187 | - | ||
188 | -#else | ||
189 | -#error "Platform not recognized" | ||
190 | -#endif | ||
191 | - | ||
192 | -/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ | ||
193 | -typedef EGLNativeDisplayType NativeDisplayType; | ||
194 | -typedef EGLNativePixmapType NativePixmapType; | ||
195 | -typedef EGLNativeWindowType NativeWindowType; | ||
196 | - | ||
197 | - | ||
198 | -/* Define EGLint. This must be a signed integral type large enough to contain | ||
199 | - * all legal attribute names and values passed into and out of EGL, whether | ||
200 | - * their type is boolean, bitmask, enumerant (symbolic constant), integer, | ||
201 | - * handle, or other. While in general a 32-bit integer will suffice, if | ||
202 | - * handles are 64 bit types, then EGLint should be defined as a signed 64-bit | ||
203 | - * integer type. | ||
204 | - */ | ||
205 | -typedef khronos_int32_t EGLint; | ||
206 | - | ||
207 | -#endif /* __eglplatform_h */ | ||
208 | diff --git a/include/EGL/eglplatform.h.in b/include/EGL/eglplatform.h.in | ||
209 | new file mode 100644 | ||
210 | index 0000000..5126c92 | ||
211 | --- /dev/null | ||
212 | +++ b/include/EGL/eglplatform.h.in | ||
213 | @@ -0,0 +1,146 @@ | ||
214 | +#ifndef __eglplatform_h_ | ||
215 | +#define __eglplatform_h_ | ||
216 | + | ||
217 | +/* | ||
218 | +** Copyright (c) 2007-2009 The Khronos Group Inc. | ||
219 | +** | ||
220 | +** Permission is hereby granted, free of charge, to any person obtaining a | ||
221 | +** copy of this software and/or associated documentation files (the | ||
222 | +** "Materials"), to deal in the Materials without restriction, including | ||
223 | +** without limitation the rights to use, copy, modify, merge, publish, | ||
224 | +** distribute, sublicense, and/or sell copies of the Materials, and to | ||
225 | +** permit persons to whom the Materials are furnished to do so, subject to | ||
226 | +** the following conditions: | ||
227 | +** | ||
228 | +** The above copyright notice and this permission notice shall be included | ||
229 | +** in all copies or substantial portions of the Materials. | ||
230 | +** | ||
231 | +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
232 | +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
233 | +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
234 | +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
235 | +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
236 | +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
237 | +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. | ||
238 | +*/ | ||
239 | + | ||
240 | +/* Platform-specific types and definitions for egl.h | ||
241 | + * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ | ||
242 | + * | ||
243 | + * Adopters may modify khrplatform.h and this file to suit their platform. | ||
244 | + * You are encouraged to submit all modifications to the Khronos group so that | ||
245 | + * they can be included in future versions of this file. Please submit changes | ||
246 | + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) | ||
247 | + * by filing a bug against product "EGL" component "Registry". | ||
248 | + */ | ||
249 | + | ||
250 | +#include <KHR/khrplatform.h> | ||
251 | + | ||
252 | +/* Macros used in EGL function prototype declarations. | ||
253 | + * | ||
254 | + * EGL functions should be prototyped as: | ||
255 | + * | ||
256 | + * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); | ||
257 | + * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); | ||
258 | + * | ||
259 | + * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h | ||
260 | + */ | ||
261 | + | ||
262 | +#ifndef EGLAPI | ||
263 | +#define EGLAPI KHRONOS_APICALL | ||
264 | +#endif | ||
265 | + | ||
266 | +#ifndef EGLAPIENTRY | ||
267 | +#define EGLAPIENTRY KHRONOS_APIENTRY | ||
268 | +#endif | ||
269 | +#define EGLAPIENTRYP EGLAPIENTRY* | ||
270 | + | ||
271 | +/* The types NativeDisplayType, NativeWindowType, and NativePixmapType | ||
272 | + * are aliases of window-system-dependent types, such as X Display * or | ||
273 | + * Windows Device Context. They must be defined in platform-specific | ||
274 | + * code below. The EGL-prefixed versions of Native*Type are the same | ||
275 | + * types, renamed in EGL 1.3 so all types in the API start with "EGL". | ||
276 | + * | ||
277 | + * Khronos STRONGLY RECOMMENDS that you use the default definitions | ||
278 | + * provided below, since these changes affect both binary and source | ||
279 | + * portability of applications using EGL running on different EGL | ||
280 | + * implementations. | ||
281 | + */ | ||
282 | + | ||
283 | +#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ | ||
284 | +#ifndef WIN32_LEAN_AND_MEAN | ||
285 | +#define WIN32_LEAN_AND_MEAN 1 | ||
286 | +#endif | ||
287 | +#include <windows.h> | ||
288 | + | ||
289 | +typedef HDC EGLNativeDisplayType; | ||
290 | +typedef HBITMAP EGLNativePixmapType; | ||
291 | +typedef HWND EGLNativeWindowType; | ||
292 | + | ||
293 | +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ | ||
294 | + | ||
295 | +typedef int EGLNativeDisplayType; | ||
296 | +typedef void *EGLNativeWindowType; | ||
297 | +typedef void *EGLNativePixmapType; | ||
298 | + | ||
299 | +#elif defined(WL_EGL_PLATFORM) | ||
300 | + | ||
301 | +typedef struct wl_display *EGLNativeDisplayType; | ||
302 | +typedef struct wl_egl_pixmap *EGLNativePixmapType; | ||
303 | +typedef struct wl_egl_window *EGLNativeWindowType; | ||
304 | + | ||
305 | +#elif defined(__GBM__) | ||
306 | + | ||
307 | +typedef struct gbm_device *EGLNativeDisplayType; | ||
308 | +typedef struct gbm_bo *EGLNativePixmapType; | ||
309 | +typedef void *EGLNativeWindowType; | ||
310 | + | ||
311 | +#elif defined(ANDROID) /* Android */ | ||
312 | + | ||
313 | +struct ANativeWindow; | ||
314 | +struct egl_native_pixmap_t; | ||
315 | + | ||
316 | +typedef struct ANativeWindow *EGLNativeWindowType; | ||
317 | +typedef struct egl_native_pixmap_t *EGLNativePixmapType; | ||
318 | +typedef void *EGLNativeDisplayType; | ||
319 | + | ||
320 | +#elif defined(__unix__) | ||
321 | + | ||
322 | +#if @MESA_EGL_NO_X11_HEADERS@ | ||
323 | + | ||
324 | +typedef void *EGLNativeDisplayType; | ||
325 | +typedef khronos_uint32_t EGLNativePixmapType; | ||
326 | +typedef khronos_uint32_t EGLNativeWindowType; | ||
327 | + | ||
328 | +#else | ||
329 | + | ||
330 | +/* X11 (tentative) */ | ||
331 | +#include <X11/Xlib.h> | ||
332 | +#include <X11/Xutil.h> | ||
333 | + | ||
334 | +typedef Display *EGLNativeDisplayType; | ||
335 | +typedef Pixmap EGLNativePixmapType; | ||
336 | +typedef Window EGLNativeWindowType; | ||
337 | + | ||
338 | +#endif /* MESA_EGL_NO_X11_HEADERS */ | ||
339 | + | ||
340 | +#else | ||
341 | +#error "Platform not recognized" | ||
342 | +#endif | ||
343 | + | ||
344 | +/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ | ||
345 | +typedef EGLNativeDisplayType NativeDisplayType; | ||
346 | +typedef EGLNativePixmapType NativePixmapType; | ||
347 | +typedef EGLNativeWindowType NativeWindowType; | ||
348 | + | ||
349 | + | ||
350 | +/* Define EGLint. This must be a signed integral type large enough to contain | ||
351 | + * all legal attribute names and values passed into and out of EGL, whether | ||
352 | + * their type is boolean, bitmask, enumerant (symbolic constant), integer, | ||
353 | + * handle, or other. While in general a 32-bit integer will suffice, if | ||
354 | + * handles are 64 bit types, then EGLint should be defined as a signed 64-bit | ||
355 | + * integer type. | ||
356 | + */ | ||
357 | +typedef khronos_int32_t EGLint; | ||
358 | + | ||
359 | +#endif /* __eglplatform_h */ | ||
360 | -- | ||
361 | 1.8.2.1 | ||
362 | |||