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