summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-05-23 15:44:07 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-25 07:50:17 +0100
commitb5fe46044ea6324d66a7387c4f0d1d42fb418a70 (patch)
treea94aa707c4c2736287d9b12dd92d5d87566bdacd
parent6ec08043dcabf62d0be9cfb43063b6a336c3ece3 (diff)
downloadpoky-b5fe46044ea6324d66a7387c4f0d1d42fb418a70.tar.gz
mesa-demos: Upgrade 8.2.0 -> 8.3.0
Drop patches included in upstream and the EGL_MESA_screen_surface extension fixes as the relevant code was removed. Rebase other patches. (From OE-Core rev: 747762233ee21eaaf480f19b85cd1d6543c7ca51) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch57
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch119
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch267
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch41
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch53
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch43
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch1592
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb (renamed from meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb)27
8 files changed, 59 insertions, 2140 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch b/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
deleted file mode 100644
index 09054cb756..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From 36829a8d7ad2888515fbee95c2a70b3d636d7538 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com>
3Date: Wed, 9 Jul 2014 14:30:33 +0200
4Subject: [PATCH 2/9] Correctly implement with AC_WITH(glut) so that
5 --without-glut works.
6
7Signed-off-by: Ross Burton <ross.burton@intel.com>
8Upstream-Status: Submitted (https://patchwork.freedesktop.org/patch/64417/)
9
10---
11 configure.ac | 26 +++++++++++++++-----------
12 1 file changed, 15 insertions(+), 11 deletions(-)
13
14diff --git a/configure.ac b/configure.ac
15index c4ee12b..9445424 100644
16--- a/configure.ac
17+++ b/configure.ac
18@@ -67,21 +67,25 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS"
19 DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
20
21 dnl Check for GLUT
22-GLUT_CFLAGS=""
23-GLUT_LIBS=-lglut
24-glut_enabled=yes
25+glut_enabled=no
26 AC_ARG_WITH([glut],
27 [AS_HELP_STRING([--with-glut=DIR],
28 [glut install directory])],
29 [GLUT_CFLAGS="-I$withval/include"
30- GLUT_LIBS="-L$withval/lib -lglut"])
31-AC_CHECK_HEADER([GL/glut.h],
32- [],
33- [glut_enabled=no])
34-AC_CHECK_LIB([glut],
35- [glutInit],
36- [],
37- [glut_enabled=no])
38+ GLUT_LIBS="-L$withval/lib -lglut"],
39+ [GLUT_CFLAGS=""
40+ GLUT_LIBS="-lglut"]
41+ )
42+AS_IF([test "x$with_glut" != xno],
43+ [AC_CHECK_HEADER([GL/glut.h],
44+ [],
45+ [glut_enabled=no])
46+ AC_CHECK_LIB([glut],
47+ [glutInit],
48+ [],
49+ [glut_enabled=no])
50+ glut_enabled=yes
51+])
52
53 dnl Check for FreeGLUT 2.6 or later
54 AC_EGREP_HEADER([glutInitContextProfile],
55--
562.0.0
57
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
index 6b58c2b776..f6b59a11fe 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
@@ -1,8 +1,7 @@
1From b25e9c675cf560b8b037dc855c6b3b1d09957867 Mon Sep 17 00:00:00 2001 1From 779438770bedf3d53e6ad8f7cd6889b7f50daf3b Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Wed, 9 Jul 2014 14:23:41 +0200 3Date: Wed, 9 Jul 2014 14:23:41 +0200
4Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or 4Subject: [PATCH] configure: Allow to disable demos which require GLEW or GLU
5 GLU
6 5
7* in some systems without X11 support we don't have GLEW, but 6* in some systems without X11 support we don't have GLEW, but
8 mesa-demos are still useful 7 mesa-demos are still useful
@@ -10,17 +9,20 @@ Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or
10Upstream-Status: Pending 9Upstream-Status: Pending
11 10
12Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 11Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
12
13Port to 8.3.0
14Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
13--- 15---
14 configure.ac | 49 ++++++++++++++++++++--------- 16 configure.ac | 49 ++++++++++++++++++++---------
15 src/Makefile.am | 14 ++++++--- 17 src/Makefile.am | 18 ++++++++---
16 src/demos/Makefile.am | 73 ++++++++++++++++++++++++------------------- 18 src/demos/Makefile.am | 73 ++++++++++++++++++++++++-------------------
17 src/egl/Makefile.am | 8 +++-- 19 src/egl/Makefile.am | 8 +++--
18 src/egl/opengles1/Makefile.am | 44 +++++++++++++++----------- 20 src/egl/opengles1/Makefile.am | 10 ++++--
19 src/egl/opengles2/Makefile.am | 33 ++++++++++--------- 21 src/egl/opengles2/Makefile.am | 29 ++++++++---------
20 6 files changed, 135 insertions(+), 86 deletions(-) 22 6 files changed, 117 insertions(+), 70 deletions(-)
21 23
22diff --git a/configure.ac b/configure.ac 24diff --git a/configure.ac b/configure.ac
23index 9445424..bc4c8d1 100644 25index 0525b09..28834cd 100644
24--- a/configure.ac 26--- a/configure.ac
25+++ b/configure.ac 27+++ b/configure.ac
26@@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile], 28@@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile],
@@ -92,10 +94,11 @@ index 9445424..bc4c8d1 100644
92 AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes") 94 AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
93 AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes") 95 AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
94diff --git a/src/Makefile.am b/src/Makefile.am 96diff --git a/src/Makefile.am b/src/Makefile.am
95index 1647d64..754c47c 100644 97index 1647d64..8b89dee 100644
96--- a/src/Makefile.am 98--- a/src/Makefile.am
97+++ b/src/Makefile.am 99+++ b/src/Makefile.am
98@@ -23,14 +23,18 @@ 100@@ -22,15 +22,19 @@
101 # Authors:
99 # Eric Anholt <eric@anholt.net> 102 # Eric Anholt <eric@anholt.net>
100 103
101+if HAVE_GLEW 104+if HAVE_GLEW
@@ -116,7 +119,7 @@ index 1647d64..754c47c 100644
116 objviewer \ 119 objviewer \
117 osdemos \ 120 osdemos \
118 perf \ 121 perf \
119@@ -40,8 +39,12 @@ SUBDIRS = \ 122@@ -40,8 +44,12 @@ SUBDIRS = \
120 slang \ 123 slang \
121 tests \ 124 tests \
122 tools \ 125 tools \
@@ -289,10 +292,10 @@ index d64a49e..4fe1ca8 100644
289+ openvg 292+ openvg
290+endif 293+endif
291diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am 294diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
292index 7a9828d..3455e75 100644 295index fa397c2..21853e8 100644
293--- a/src/egl/opengles1/Makefile.am 296--- a/src/egl/opengles1/Makefile.am
294+++ b/src/egl/opengles1/Makefile.am 297+++ b/src/egl/opengles1/Makefile.am
295@@ -36,28 +36,43 @@ AM_LDFLAGS = \ 298@@ -36,9 +36,12 @@ AM_LDFLAGS = \
296 $(EGL_LIBS) \ 299 $(EGL_LIBS) \
297 -lm 300 -lm
298 301
@@ -301,42 +304,13 @@ index 7a9828d..3455e75 100644
301 if HAVE_EGL 304 if HAVE_EGL
302 if HAVE_GLESV1 305 if HAVE_GLESV1
303-noinst_PROGRAMS = \ 306-noinst_PROGRAMS = \
304- bindtex \
305- clear \
306+noinst_PROGRAMS += \
307 drawtex_screen \
308+ gears_screen \
309+ torus_screen \
310+ tri_screen
311+
312+drawtex_screen_SOURCES = drawtex.c
313+gears_screen_SOURCES = gears.c
314+torus_screen_SOURCES = torus.c
315+tri_screen_SOURCES = tri.c
316+
317+drawtex_screen_LDADD = ../eglut/libeglut_screen.la
318+gears_screen_LDADD = ../eglut/libeglut_screen.la
319+torus_screen_LDADD = ../eglut/libeglut_screen.la
320+tri_screen_LDADD = ../eglut/libeglut_screen.la
321+
322+if HAVE_X11 307+if HAVE_X11
323+noinst_PROGRAMS += \
324+ clear
325+
326+bin_PROGRAMS = \ 308+bin_PROGRAMS = \
327+ bindtex \ 309 bindtex \
310 clear \
328 drawtex_x11 \ 311 drawtex_x11 \
329 eglfbdev \ 312@@ -52,8 +55,6 @@ noinst_PROGRAMS = \
330 es1_info \
331- gears_screen \
332 gears_x11 \
333 msaa \
334 pbuffer\
335 render_tex \
336 texture_from_pixmap \
337- torus_screen \
338 torus_x11 \ 313 torus_x11 \
339- tri_screen \
340 tri_x11 \ 314 tri_x11 \
341 two_win 315 two_win
342-endif 316-endif
@@ -344,26 +318,7 @@ index 7a9828d..3455e75 100644
344 318
345 bindtex_LDADD = $(X11_LIBS) 319 bindtex_LDADD = $(X11_LIBS)
346 es1_info_LDADD = $(X11_LIBS) 320 es1_info_LDADD = $(X11_LIBS)
347@@ -71,22 +86,15 @@ two_win_LDADD = $(X11_LIBS) 321@@ -76,3 +77,6 @@ drawtex_x11_LDADD = ../eglut/libeglut_x11.la
348 clear_LDADD = ../eglut/libeglut_x11.la $(EGL_LIBS) $(X11_LIBS)
349 clear_LDFLAGS =
350
351-drawtex_screen_SOURCES = drawtex.c
352-gears_screen_SOURCES = gears.c
353-torus_screen_SOURCES = torus.c
354-tri_screen_SOURCES = tri.c
355-
356 drawtex_x11_SOURCES = drawtex.c
357 gears_x11_SOURCES = gears.c
358 torus_x11_SOURCES = torus.c
359 tri_x11_SOURCES = tri.c
360
361-drawtex_screen_LDADD = ../eglut/libeglut_screen.la
362-gears_screen_LDADD = ../eglut/libeglut_screen.la
363-torus_screen_LDADD = ../eglut/libeglut_screen.la
364-tri_screen_LDADD = ../eglut/libeglut_screen.la
365-
366 drawtex_x11_LDADD = ../eglut/libeglut_x11.la
367 gears_x11_LDADD = ../eglut/libeglut_x11.la 322 gears_x11_LDADD = ../eglut/libeglut_x11.la
368 torus_x11_LDADD = ../eglut/libeglut_x11.la 323 torus_x11_LDADD = ../eglut/libeglut_x11.la
369 tri_x11_LDADD = ../eglut/libeglut_x11.la 324 tri_x11_LDADD = ../eglut/libeglut_x11.la
@@ -371,35 +326,35 @@ index 7a9828d..3455e75 100644
371+endif 326+endif
372+endif 327+endif
373diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am 328diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am
374index 41c1b80..74af460 100644 329index b80ba50..17f8d49 100644
375--- a/src/egl/opengles2/Makefile.am 330--- a/src/egl/opengles2/Makefile.am
376+++ b/src/egl/opengles2/Makefile.am 331+++ b/src/egl/opengles2/Makefile.am
377@@ -36,26 +36,29 @@ AM_LDFLAGS = \ 332@@ -33,27 +33,28 @@ AM_LDFLAGS = \
333 $(EGL_LIBS) \
334 -lm
335
336+bin_PROGRAMS =
337+
378 if HAVE_EGL 338 if HAVE_EGL
379 if HAVE_GLESV2 339 if HAVE_GLESV2
380 bin_PROGRAMS = \ 340-bin_PROGRAMS =
341-if HAVE_X11
342-bin_PROGRAMS += \
381- es2_info \ 343- es2_info \
382- es2gears_screen \
383- es2gears_x11 \ 344- es2gears_x11 \
384- es2tri 345- es2tri
385+ es2gears_screen 346-endif
386+
387+es2gears_screen_SOURCES = es2gears.c
388+es2gears_screen_LDADD = ../eglut/libeglut_screen.la
389+
390 if HAVE_WAYLAND 347 if HAVE_WAYLAND
391 bin_PROGRAMS += es2gears_wayland 348 bin_PROGRAMS += es2gears_wayland
392-endif 349-endif
393-endif 350-endif
394-endif 351+
395
396-es2_info_LDADD = $(X11_LIBS)
397-es2tri_LDADD = $(X11_LIBS)
398+es2gears_wayland_SOURCES = es2gears.c 352+es2gears_wayland_SOURCES = es2gears.c
399+es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la 353+es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
400+endif 354 endif
401 355
402-es2gears_screen_SOURCES = es2gears.c 356-es2_info_LDADD = $(X11_LIBS)
357-es2tri_LDADD = $(X11_LIBS)
403+if HAVE_X11 358+if HAVE_X11
404+bin_PROGRAMS += \ 359+bin_PROGRAMS += \
405+ es2tri \ 360+ es2tri \
@@ -409,8 +364,6 @@ index 41c1b80..74af460 100644
409+es2_info_LDADD = $(X11_LIBS) 364+es2_info_LDADD = $(X11_LIBS)
410 es2gears_x11_SOURCES = es2gears.c 365 es2gears_x11_SOURCES = es2gears.c
411- 366-
412-es2gears_screen_LDADD = ../eglut/libeglut_screen.la
413-
414 es2gears_x11_LDADD = ../eglut/libeglut_x11.la 367 es2gears_x11_LDADD = ../eglut/libeglut_x11.la
415+es2tri_LDADD = $(X11_LIBS) 368+es2tri_LDADD = $(X11_LIBS)
416+endif 369+endif
@@ -420,5 +373,5 @@ index 41c1b80..74af460 100644
420-es2gears_wayland_SOURCES = es2gears.c 373-es2gears_wayland_SOURCES = es2gears.c
421-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la 374-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
422-- 375--
4232.0.0 3762.1.4
424 377
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch b/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch
deleted file mode 100644
index aac2a37294..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch
+++ /dev/null
@@ -1,267 +0,0 @@
1From 453353a221de9c64479f4372565d2cd8591b36cc Mon Sep 17 00:00:00 2001
2From: Frank Binns <frank.binns@imgtec.com>
3Date: Fri, 29 Jun 2012 11:26:04 +0100
4Subject: [PATCH 5/9] Fix build when EGL_MESA_screen_surface extension isn't
5 present
6
7The EGL demos won't build against EGL implementations that don't support
8the EGL_MESA_screen_surface extension. Fix this, in most cases, by
9wrapping relevant bits of code in #ifdef EGL_MESA_screen_surface.
10
11Signed-off-by: Frank Binns <frank.binns@imgtec.com>
12
13Applied and fixed up in Yocto by...
14
15Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
16
17Upstream-Status: Pending
18---
19 src/egl/eglut/eglut.c | 9 +++++++--
20 src/egl/eglut/eglut_screen.c | 14 ++++++++++++++
21 src/egl/opengl/demo1.c | 2 ++
22 src/egl/opengl/demo2.c | 7 ++++++-
23 src/egl/opengl/demo3.c | 7 ++++++-
24 5 files changed, 35 insertions(+), 4 deletions(-)
25
26diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
27index 2ee6f15..f6a2ad4 100644
28--- a/src/egl/eglut/eglut.c
29+++ b/src/egl/eglut/eglut.c
30@@ -76,8 +76,9 @@ _eglutNow(void)
31 static void
32 _eglutDestroyWindow(struct eglut_window *win)
33 {
34- if (_eglut->surface_type != EGL_PBUFFER_BIT &&
35- _eglut->surface_type != EGL_SCREEN_BIT_MESA)
36+
37+ if (_eglut->surface_type == EGL_WINDOW_BIT ||
38+ _eglut->surface_type == EGL_PIXMAP_BIT)
39 eglDestroySurface(_eglut->dpy, win->surface);
40
41 _eglutNativeFiniWindow(win);
42@@ -175,7 +176,9 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h)
43 win->config, win->native.u.pixmap, NULL);
44 break;
45 case EGL_PBUFFER_BIT:
46+#ifdef EGL_MESA_screen_surface
47 case EGL_SCREEN_BIT_MESA:
48+#endif
49 win->surface = win->native.u.surface;
50 break;
51 default:
52@@ -289,8 +292,10 @@ eglutDestroyWindow(int win)
53 if (window->index != win)
54 return;
55
56+#ifdef EGL_MESA_screen_surface
57 /* XXX it causes some bug in st/egl KMS backend */
58 if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA)
59+#endif
60 eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
61
62 _eglutDestroyWindow(_eglut->current);
63diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c
64index 021a8f1..094a4e2 100644
65--- a/src/egl/eglut/eglut_screen.c
66+++ b/src/egl/eglut/eglut_screen.c
67@@ -35,26 +35,33 @@
68
69 #define MAX_MODES 100
70
71+#ifdef EGL_MESA_screen_surface
72 static EGLScreenMESA kms_screen;
73 static EGLModeMESA kms_mode;
74 static EGLint kms_width, kms_height;
75+#endif
76
77 void
78 _eglutNativeInitDisplay(void)
79 {
80+#ifdef EGL_MESA_screen_surface
81 _eglut->native_dpy = EGL_DEFAULT_DISPLAY;
82 _eglut->surface_type = EGL_SCREEN_BIT_MESA;
83+#endif
84 }
85
86 void
87 _eglutNativeFiniDisplay(void)
88 {
89+#ifdef EGL_MESA_screen_surface
90 kms_screen = 0;
91 kms_mode = 0;
92 kms_width = 0;
93 kms_height = 0;
94+#endif
95 }
96
97+#ifdef EGL_MESA_screen_surface
98 static void
99 init_kms(void)
100 {
101@@ -94,19 +101,23 @@ init_kms(void)
102 kms_width = width;
103 kms_height = height;
104 }
105+#endif
106
107 void
108 _eglutNativeInitWindow(struct eglut_window *win, const char *title,
109 int x, int y, int w, int h)
110 {
111+#ifdef EGL_MESA_screen_surface
112 EGLint surf_attribs[16];
113 EGLint i;
114+#endif
115 const char *exts;
116
117 exts = eglQueryString(_eglut->dpy, EGL_EXTENSIONS);
118 if (!exts || !strstr(exts, "EGL_MESA_screen_surface"))
119 _eglutFatal("EGL_MESA_screen_surface is not supported\n");
120
121+#ifdef EGL_MESA_screen_surface
122 init_kms();
123
124 i = 0;
125@@ -128,14 +139,17 @@ _eglutNativeInitWindow(struct eglut_window *win, const char *title,
126
127 win->native.width = kms_width;
128 win->native.height = kms_height;
129+#endif
130 }
131
132 void
133 _eglutNativeFiniWindow(struct eglut_window *win)
134 {
135+#ifdef EGL_MESA_screen_surface
136 eglShowScreenSurfaceMESA(_eglut->dpy,
137 kms_screen, EGL_NO_SURFACE, 0);
138 eglDestroySurface(_eglut->dpy, win->native.u.surface);
139+#endif
140 }
141
142 void
143diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
144index d892734..3a3564c 100644
145--- a/src/egl/opengl/demo1.c
146+++ b/src/egl/opengl/demo1.c
147@@ -18,6 +18,7 @@
148 static void
149 TestScreens(EGLDisplay dpy)
150 {
151+#ifdef EGL_MESA_screen_surface
152 #define MAX 8
153 EGLScreenMESA screens[MAX];
154 EGLint numScreens;
155@@ -28,6 +29,7 @@ TestScreens(EGLDisplay dpy)
156 for (i = 0; i < numScreens; i++) {
157 printf(" Screen %d handle: %d\n", i, (int) screens[i]);
158 }
159+#endif
160 }
161
162 /**
163diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c
164index 505b474..bfef59e 100644
165--- a/src/egl/opengl/demo2.c
166+++ b/src/egl/opengl/demo2.c
167@@ -16,6 +16,7 @@
168
169 /*#define FRONTBUFFER*/
170
171+#ifdef EGL_MESA_screen_surface
172 static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
173 GLfloat r, GLfloat g, GLfloat b)
174 {
175@@ -95,12 +96,13 @@ TestScreens(EGLDisplay dpy)
176 printf(" Screen %d handle: %d\n", i, (int) screens[i]);
177 }
178 }
179-
180+#endif
181
182 int
183 main(int argc, char *argv[])
184 {
185 int maj, min;
186+#ifdef EGL_MESA_screen_surface
187 EGLContext ctx;
188 EGLSurface pbuffer, screen_surf;
189 EGLConfig configs[10];
190@@ -115,6 +117,7 @@ main(int argc, char *argv[])
191 EGLModeMESA mode;
192 EGLScreenMESA screen;
193 EGLint count;
194+#endif
195
196 EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
197 assert(d);
198@@ -132,6 +135,7 @@ main(int argc, char *argv[])
199 exit(1);
200 }
201
202+#ifdef EGL_MESA_screen_surface
203 eglGetConfigs(d, configs, 10, &numConfigs);
204 printf("Got %d EGL configs:\n", numConfigs);
205 for (i = 0; i < numConfigs; i++) {
206@@ -211,6 +215,7 @@ main(int argc, char *argv[])
207 eglDestroySurface(d, pbuffer);
208 eglDestroyContext(d, ctx);
209 eglTerminate(d);
210+#endif
211
212 return 0;
213 }
214diff --git a/src/egl/opengl/demo3.c b/src/egl/opengl/demo3.c
215index f84ca23..31b5d8b 100644
216--- a/src/egl/opengl/demo3.c
217+++ b/src/egl/opengl/demo3.c
218@@ -46,7 +46,7 @@ GLubyte OpenGL_bits[] = {
219 0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00,
220 };
221
222-
223+#ifdef EGL_MESA_screen_surface
224 static void Init(void)
225 {
226
227@@ -551,11 +551,13 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
228 fclose(f);
229 }
230 }
231+#endif
232
233 int
234 main(int argc, char *argv[])
235 {
236 int maj, min;
237+#ifdef EGL_MESA_screen_surface
238 EGLContext ctx;
239 EGLSurface screen_surf;
240 EGLConfig configs[10];
241@@ -566,6 +568,7 @@ main(int argc, char *argv[])
242 const GLubyte *bitmap;
243 EGLint screenAttribs[32];
244 EGLint i;
245+#endif
246
247 EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
248 assert(d);
249@@ -583,6 +586,7 @@ main(int argc, char *argv[])
250 exit(1);
251 }
252
253+#ifdef EGL_MESA_screen_surface
254 eglGetConfigs(d, configs, 10, &numConfigs);
255 eglGetScreensMESA(d, &screen, 1, &count);
256 eglGetModesMESA(d, screen, &mode, 1, &count);
257@@ -642,6 +646,7 @@ main(int argc, char *argv[])
258 eglDestroySurface(d, screen_surf);
259 eglDestroyContext(d, ctx);
260 eglTerminate(d);
261+#endif
262
263 return 0;
264 }
265--
2662.0.0
267
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch b/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch
deleted file mode 100644
index 12e0805f15..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 6a19dba1d275579c73e7763b0554410ff4e1e650 Mon Sep 17 00:00:00 2001
2From: Frank Binns <frank.binns@imgtec.com>
3Date: Fri, 29 Jun 2012 12:00:26 +0100
4Subject: [PATCH 6/9] Query display for EGL_MESA_screen_surface extension
5 before using it
6
7This code makes heavy use of the EGL_MESA_screen_surface extension so
8check the display to determine if it's supported by the underlying EGL
9implementation. If it doesn't then bail.
10
11Signed-off-by: Frank Binns <frank.binns@imgtec.com>
12
13Applied and fixed up in Yocto by...
14
15Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
16
17Upstream-Status: Pending
18---
19 src/egl/opengl/demo1.c | 6 ++++++
20 1 file changed, 6 insertions(+)
21
22diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
23index 3a3564c..06e2138 100644
24--- a/src/egl/opengl/demo1.c
25+++ b/src/egl/opengl/demo1.c
26@@ -110,6 +110,12 @@ main(int argc, char *argv[])
27 printf("EGL version = %d.%d\n", maj, min);
28 printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
29
30+ if (!strstr(eglQueryString(d, EGL_EXTENSIONS),
31+ "EGL_MESA_screen_surface")) {
32+ printf("EGL_MESA_screen_surface is not supported\n");
33+ exit(1);
34+ }
35+
36 eglGetConfigs(d, NULL, 0, &numConfigs);
37 configs = malloc(sizeof(*configs) *numConfigs);
38 eglGetConfigs(d, configs, numConfigs, &numConfigs);
39--
402.0.0
41
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch b/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
index 89d2fac4fd..6b676cdd20 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
@@ -1,11 +1,13 @@
1From d930b2da57f7c9efb80c8cef8f8adad15bbbc0d3 Mon Sep 17 00:00:00 2001 1From c59e286fa4e818ca015dd40e4725636309970ea8 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 10 Jul 2014 14:30:52 +0200 3Date: Thu, 10 Jul 2014 14:30:52 +0200
4Subject: [PATCH 7/9] Install few more test programs 4Subject: [PATCH] Install few more test programs
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
7 7
8Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 8Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
9
10Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
9--- 11---
10 src/egl/opengl/Makefile.am | 2 +- 12 src/egl/opengl/Makefile.am | 2 +-
11 src/egl/opengles1/Makefile.am | 10 ++++------ 13 src/egl/opengles1/Makefile.am | 10 ++++------
@@ -13,7 +15,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
13 3 files changed, 6 insertions(+), 8 deletions(-) 15 3 files changed, 6 insertions(+), 8 deletions(-)
14 16
15diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am 17diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
16index 0c7228f..87b2f1a 100644 18index fe7faa9..3e48141 100644
17--- a/src/egl/opengl/Makefile.am 19--- a/src/egl/opengl/Makefile.am
18+++ b/src/egl/opengl/Makefile.am 20+++ b/src/egl/opengl/Makefile.am
19@@ -50,7 +50,7 @@ endif 21@@ -50,7 +50,7 @@ endif
@@ -22,42 +24,11 @@ index 0c7228f..87b2f1a 100644
22 if HAVE_EGL 24 if HAVE_EGL
23-noinst_PROGRAMS = \ 25-noinst_PROGRAMS = \
24+bin_PROGRAMS = \ 26+bin_PROGRAMS = \
25 demo1 \ 27 eglinfo \
26 demo2 \ 28 peglgears \
27 demo3 \ 29 $(EGL_DRM_DEMOS) \
28diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
29index 3455e75..516e516 100644
30--- a/src/egl/opengles1/Makefile.am
31+++ b/src/egl/opengles1/Makefile.am
32@@ -36,11 +36,11 @@ AM_LDFLAGS = \
33 $(EGL_LIBS) \
34 -lm
35
36-noinst_PROGRAMS =
37+bin_PROGRAMS =
38
39 if HAVE_EGL
40 if HAVE_GLESV1
41-noinst_PROGRAMS += \
42+bin_PROGRAMS += \
43 drawtex_screen \
44 gears_screen \
45 torus_screen \
46@@ -57,10 +57,8 @@ torus_screen_LDADD = ../eglut/libeglut_screen.la
47 tri_screen_LDADD = ../eglut/libeglut_screen.la
48
49 if HAVE_X11
50-noinst_PROGRAMS += \
51- clear
52-
53-bin_PROGRAMS = \
54+bin_PROGRAMS += \
55+ clear \
56 bindtex \
57 drawtex_x11 \
58 eglfbdev \
59diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am 30diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
60index 7318a43..b545225 100644 31index b0f1212..5fd1cf8 100644
61--- a/src/egl/openvg/Makefile.am 32--- a/src/egl/openvg/Makefile.am
62+++ b/src/egl/openvg/Makefile.am 33+++ b/src/egl/openvg/Makefile.am
63@@ -49,7 +49,7 @@ endif 34@@ -49,7 +49,7 @@ endif
@@ -66,9 +37,9 @@ index 7318a43..b545225 100644
66 if HAVE_VG 37 if HAVE_VG
67-noinst_PROGRAMS = \ 38-noinst_PROGRAMS = \
68+bin_PROGRAMS = \ 39+bin_PROGRAMS = \
69 lion_screen \
70 sp_screen \
71 $(EGL_X11_DEMOS) 40 $(EGL_X11_DEMOS)
41 endif
42 endif
72-- 43--
732.0.0 442.1.4
74 45
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch b/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
deleted file mode 100644
index 04e1b446f3..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 525fa9ded72d22b53c5eb366f61e2ac1d407a2db Mon Sep 17 00:00:00 2001
2From: Awais Belal <awais_belal@mentor.com>
3Date: Thu, 8 Oct 2015 13:49:31 +0500
4Subject: [PATCH] sharedtex_mt: fix rendering thread hang
5
6XNextEvent is a blocking call which locks up the display mutex
7this causes the rendering threads to hang when they try call
8glXSwapBuffers() as that tries to take the same mutex in
9underlying calls through XCopyArea().
10So we only go to XNextEvent when it has at least one event
11and we wouldn't lock indefinitely.
12
13Signed-off-by: Awais Belal <awais_belal@mentor.com>
14Upstream-Status: Backport (2b304e765695d385fd3bf414e6e444020bedb0a8)
15
16---
17 src/xdemos/sharedtex_mt.c | 9 +++++++--
18 1 file changed, 7 insertions(+), 2 deletions(-)
19
20diff --git a/src/xdemos/sharedtex_mt.c b/src/xdemos/sharedtex_mt.c
21index a90903a..1d503c4 100644
22--- a/src/xdemos/sharedtex_mt.c
23+++ b/src/xdemos/sharedtex_mt.c
24@@ -420,9 +420,14 @@ Resize(struct window *h, unsigned int width, unsigned int height)
25 static void
26 EventLoop(void)
27 {
28+ int i;
29+ XEvent event;
30 while (1) {
31- int i;
32- XEvent event;
33+ /* Do we have an event? */
34+ if (XPending(gDpy) == 0) {
35+ usleep(10000);
36+ continue;
37+ }
38 XNextEvent(gDpy, &event);
39 for (i = 0; i < NumWindows; i++) {
40 struct window *h = &Windows[i];
41--
421.9.1
43
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch b/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch
deleted file mode 100644
index a2621ce732..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch
+++ /dev/null
@@ -1,1592 +0,0 @@
1commit 74443c6ee79f3251f643ea05e94df58183e37d0d
2Author: Matt Turner <mattst88@gmail.com>
3Date: Fri Aug 28 15:57:38 2015 -0700
4
5 egl: Remove demos using EGL_MESA_screen_surface.
6
7 The remnants of the extension were removed from Mesa in commit 7a58262e.
8
9 Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
10 Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 Reviewed-by: Marek Olšák <marek.olsak@amd.com>
12
13Upstream-Status: Backport
14
15diff --git a/src/egl/eglut/Makefile.am b/src/egl/eglut/Makefile.am
16index 2d2f2af..b765069 100644
17--- a/src/egl/eglut/Makefile.am
18+++ b/src/egl/eglut/Makefile.am
19@@ -33,17 +33,12 @@ if HAVE_WAYLAND
20 eglut_wayland = libeglut_wayland.la
21 endif
22
23-noinst_LTLIBRARIES = libeglut_screen.la $(eglut_x11) $(eglut_wayland)
24+noinst_LTLIBRARIES = $(eglut_x11) $(eglut_wayland)
25 endif
26
27-libeglut_screen_la_SOURCES = \
28- eglut.c \
29- eglut.h \
30- eglutint.h \
31- eglut_screen.c
32-
33 libeglut_x11_la_SOURCES = \
34 eglut.c \
35+ eglut.h \
36 eglutint.h \
37 eglut_x11.c
38 libeglut_x11_la_CFLAGS = $(X11_CFLAGS) $(EGL_CFLAGS)
39@@ -52,6 +47,7 @@ libeglut_x11_la_LIBADD = $(X11_LIBS) $(EGL_LIBS)
40
41 libeglut_wayland_la_SOURCES = \
42 eglut.c \
43+ eglut.h \
44 eglutint.h \
45 eglut_wayland.c
46
47diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
48index f6a2ad4..58b354a 100644
49--- a/src/egl/eglut/eglut.c
50+++ b/src/egl/eglut/eglut.c
51@@ -176,9 +176,6 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h)
52 win->config, win->native.u.pixmap, NULL);
53 break;
54 case EGL_PBUFFER_BIT:
55-#ifdef EGL_MESA_screen_surface
56- case EGL_SCREEN_BIT_MESA:
57-#endif
58 win->surface = win->native.u.surface;
59 break;
60 default:
61@@ -292,11 +289,7 @@ eglutDestroyWindow(int win)
62 if (window->index != win)
63 return;
64
65-#ifdef EGL_MESA_screen_surface
66- /* XXX it causes some bug in st/egl KMS backend */
67- if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA)
68-#endif
69- eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
70+ eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
71
72 _eglutDestroyWindow(_eglut->current);
73 }
74diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c
75deleted file mode 100644
76index 094a4e2..0000000
77--- a/src/egl/eglut/eglut_screen.c
78+++ /dev/null
79@@ -1,194 +0,0 @@
80-/*
81- * Copyright (C) 2010 LunarG Inc.
82- *
83- * Permission is hereby granted, free of charge, to any person obtaining a
84- * copy of this software and associated documentation files (the "Software"),
85- * to deal in the Software without restriction, including without limitation
86- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
87- * and/or sell copies of the Software, and to permit persons to whom the
88- * Software is furnished to do so, subject to the following conditions:
89- *
90- * The above copyright notice and this permission notice shall be included
91- * in all copies or substantial portions of the Software.
92- *
93- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
94- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
95- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
96- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
97- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
98- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
99- * DEALINGS IN THE SOFTWARE.
100- *
101- * Authors:
102- * Chia-I Wu <olv@lunarg.com>
103- */
104-
105-#include <stdio.h>
106-#include <string.h>
107-#include <sys/time.h>
108-
109-#define EGL_EGLEXT_PROTOTYPES
110-#include "EGL/egl.h"
111-#include "EGL/eglext.h"
112-
113-#include "eglutint.h"
114-
115-#define MAX_MODES 100
116-
117-#ifdef EGL_MESA_screen_surface
118-static EGLScreenMESA kms_screen;
119-static EGLModeMESA kms_mode;
120-static EGLint kms_width, kms_height;
121-#endif
122-
123-void
124-_eglutNativeInitDisplay(void)
125-{
126-#ifdef EGL_MESA_screen_surface
127- _eglut->native_dpy = EGL_DEFAULT_DISPLAY;
128- _eglut->surface_type = EGL_SCREEN_BIT_MESA;
129-#endif
130-}
131-
132-void
133-_eglutNativeFiniDisplay(void)
134-{
135-#ifdef EGL_MESA_screen_surface
136- kms_screen = 0;
137- kms_mode = 0;
138- kms_width = 0;
139- kms_height = 0;
140-#endif
141-}
142-
143-#ifdef EGL_MESA_screen_surface
144-static void
145-init_kms(void)
146-{
147- EGLModeMESA modes[MAX_MODES];
148- EGLint num_screens, num_modes;
149- EGLint width, height, best_mode;
150- EGLint i;
151-
152- if (!eglGetScreensMESA(_eglut->dpy, &kms_screen, 1, &num_screens) ||
153- !num_screens)
154- _eglutFatal("eglGetScreensMESA failed\n");
155-
156- if (!eglGetModesMESA(_eglut->dpy, kms_screen,
157- modes, MAX_MODES, &num_modes) || !num_modes)
158- _eglutFatal("eglGetModesMESA failed!\n");
159-
160- printf("Found %d modes:\n", num_modes);
161-
162- best_mode = 0;
163- width = 0;
164- height = 0;
165- for (i = 0; i < num_modes; i++) {
166- EGLint w, h;
167- eglGetModeAttribMESA(_eglut->dpy, modes[i], EGL_WIDTH, &w);
168- eglGetModeAttribMESA(_eglut->dpy, modes[i], EGL_HEIGHT, &h);
169- printf("%3d: %d x %d\n", i, w, h);
170- if (w > width && h > height) {
171- width = w;
172- height = h;
173- best_mode = i;
174- }
175- }
176-
177- printf("Will use screen size: %d x %d\n", width, height);
178-
179- kms_mode = modes[best_mode];
180- kms_width = width;
181- kms_height = height;
182-}
183-#endif
184-
185-void
186-_eglutNativeInitWindow(struct eglut_window *win, const char *title,
187- int x, int y, int w, int h)
188-{
189-#ifdef EGL_MESA_screen_surface
190- EGLint surf_attribs[16];
191- EGLint i;
192-#endif
193- const char *exts;
194-
195- exts = eglQueryString(_eglut->dpy, EGL_EXTENSIONS);
196- if (!exts || !strstr(exts, "EGL_MESA_screen_surface"))
197- _eglutFatal("EGL_MESA_screen_surface is not supported\n");
198-
199-#ifdef EGL_MESA_screen_surface
200- init_kms();
201-
202- i = 0;
203- surf_attribs[i++] = EGL_WIDTH;
204- surf_attribs[i++] = kms_width;
205- surf_attribs[i++] = EGL_HEIGHT;
206- surf_attribs[i++] = kms_height;
207- surf_attribs[i++] = EGL_NONE;
208-
209- /* create surface */
210- win->native.u.surface = eglCreateScreenSurfaceMESA(_eglut->dpy,
211- win->config, surf_attribs);
212- if (win->native.u.surface == EGL_NO_SURFACE)
213- _eglutFatal("eglCreateScreenSurfaceMESA failed\n");
214-
215- if (!eglShowScreenSurfaceMESA(_eglut->dpy, kms_screen,
216- win->native.u.surface, kms_mode))
217- _eglutFatal("eglShowScreenSurfaceMESA failed\n");
218-
219- win->native.width = kms_width;
220- win->native.height = kms_height;
221-#endif
222-}
223-
224-void
225-_eglutNativeFiniWindow(struct eglut_window *win)
226-{
227-#ifdef EGL_MESA_screen_surface
228- eglShowScreenSurfaceMESA(_eglut->dpy,
229- kms_screen, EGL_NO_SURFACE, 0);
230- eglDestroySurface(_eglut->dpy, win->native.u.surface);
231-#endif
232-}
233-
234-void
235-_eglutNativeEventLoop(void)
236-{
237- int start = _eglutNow();
238- int frames = 0;
239-
240- _eglut->redisplay = 1;
241-
242- while (1) {
243- struct eglut_window *win = _eglut->current;
244- int now = _eglutNow();
245-
246- if (now - start > 5000) {
247- double elapsed = (double) (now - start) / 1000.0;
248-
249- printf("%d frames in %3.1f seconds = %6.3f FPS\n",
250- frames, elapsed, frames / elapsed);
251- fflush(stdout);
252-
253- start = now;
254- frames = 0;
255-
256- /* send escape */
257- if (win->keyboard_cb)
258- win->keyboard_cb(27);
259- }
260-
261- if (_eglut->idle_cb)
262- _eglut->idle_cb();
263-
264- if (_eglut->redisplay) {
265- _eglut->redisplay = 0;
266-
267- if (win->display_cb)
268- win->display_cb();
269- eglSwapBuffers(_eglut->dpy, win->surface);
270- frames++;
271- }
272- }
273-}
274diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
275index 87b2f1a..3e48141 100644
276--- a/src/egl/opengl/Makefile.am
277+++ b/src/egl/opengl/Makefile.am
278@@ -51,20 +51,12 @@ endif
279
280 if HAVE_EGL
281 bin_PROGRAMS = \
282- demo1 \
283- demo2 \
284- demo3 \
285 eglinfo \
286- eglgears_screen \
287- egltri_screen \
288 peglgears \
289 $(EGL_DRM_DEMOS) \
290 $(EGL_X11_DEMOS)
291 endif
292
293-egltri_screen_SOURCES = egltri.c
294-eglgears_screen_SOURCES = eglgears.c
295-
296 egltri_x11_SOURCES = egltri.c
297 eglgears_x11_SOURCES = eglgears.c
298
299@@ -73,9 +65,6 @@ egltri_x11_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS)
300 xeglgears_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS)
301 xeglthreads_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS) -pthread
302
303-eglgears_screen_LDADD = ../eglut/libeglut_screen.la
304-egltri_screen_LDADD = ../eglut/libeglut_screen.la
305-
306 eglgears_x11_LDADD = ../eglut/libeglut_x11.la
307 egltri_x11_LDADD = ../eglut/libeglut_x11.la
308
309diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
310deleted file mode 100644
311index 06e2138..0000000
312--- a/src/egl/opengl/demo1.c
313+++ /dev/null
314@@ -1,155 +0,0 @@
315-/*
316- * Exercise EGL API functions
317- */
318-
319-#define EGL_EGLEXT_PROTOTYPES
320-
321-#include <EGL/egl.h>
322-#include <EGL/eglext.h>
323-#include <assert.h>
324-#include <stdio.h>
325-#include <stdlib.h>
326-#include <string.h>
327-
328-
329-/**
330- * Test EGL_MESA_screen_surface functions
331- */
332-static void
333-TestScreens(EGLDisplay dpy)
334-{
335-#ifdef EGL_MESA_screen_surface
336-#define MAX 8
337- EGLScreenMESA screens[MAX];
338- EGLint numScreens;
339- EGLint i;
340-
341- eglGetScreensMESA(dpy, screens, MAX, &numScreens);
342- printf("Found %d screens\n", numScreens);
343- for (i = 0; i < numScreens; i++) {
344- printf(" Screen %d handle: %d\n", i, (int) screens[i]);
345- }
346-#endif
347-}
348-
349-/**
350- * Print table of all available configurations.
351- */
352-static void
353-PrintConfigs(EGLDisplay d, EGLConfig *configs, EGLint numConfigs)
354-{
355- EGLint i;
356-
357- printf("Configurations:\n");
358- printf(" bf lv d st colorbuffer dp st supported \n");
359- printf(" id sz l b ro r g b a th cl surfaces \n");
360- printf("----------------------------------------------\n");
361- for (i = 0; i < numConfigs; i++) {
362- EGLint id, size, level;
363- EGLint red, green, blue, alpha;
364- EGLint depth, stencil;
365- EGLint surfaces;
366- EGLint doubleBuf = 1, stereo = 0;
367- char surfString[100] = "";
368-
369- eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
370- eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size);
371- eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level);
372-
373- eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red);
374- eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green);
375- eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue);
376- eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha);
377- eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
378- eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil);
379- eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces);
380-
381- if (surfaces & EGL_WINDOW_BIT)
382- strcat(surfString, "win,");
383- if (surfaces & EGL_PBUFFER_BIT)
384- strcat(surfString, "pb,");
385- if (surfaces & EGL_PIXMAP_BIT)
386- strcat(surfString, "pix,");
387- if (strlen(surfString) > 0)
388- surfString[strlen(surfString) - 1] = 0;
389-
390- printf("0x%02x %2d %2d %c %c %2d %2d %2d %2d %2d %2d %-12s\n",
391- id, size, level,
392- doubleBuf ? 'y' : '.',
393- stereo ? 'y' : '.',
394- red, green, blue, alpha,
395- depth, stencil, surfString);
396- }
397-}
398-
399-
400-
401-int
402-main(int argc, char *argv[])
403-{
404- int maj, min;
405- EGLContext ctx;
406- EGLSurface pbuffer;
407- EGLConfig *configs;
408- EGLint numConfigs;
409- EGLBoolean b;
410- const EGLint pbufAttribs[] = {
411- EGL_WIDTH, 500,
412- EGL_HEIGHT, 500,
413- EGL_NONE
414- };
415-
416- EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
417- assert(d);
418-
419- if (!eglInitialize(d, &maj, &min)) {
420- printf("demo: eglInitialize failed\n");
421- exit(1);
422- }
423-
424- printf("EGL version = %d.%d\n", maj, min);
425- printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
426-
427- if (!strstr(eglQueryString(d, EGL_EXTENSIONS),
428- "EGL_MESA_screen_surface")) {
429- printf("EGL_MESA_screen_surface is not supported\n");
430- exit(1);
431- }
432-
433- eglGetConfigs(d, NULL, 0, &numConfigs);
434- configs = malloc(sizeof(*configs) *numConfigs);
435- eglGetConfigs(d, configs, numConfigs, &numConfigs);
436-
437- PrintConfigs(d, configs, numConfigs);
438-
439- eglBindAPI(EGL_OPENGL_API);
440- ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
441- if (ctx == EGL_NO_CONTEXT) {
442- printf("failed to create context\n");
443- return 0;
444- }
445-
446- pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs);
447- if (pbuffer == EGL_NO_SURFACE) {
448- printf("failed to create pbuffer\n");
449- return 0;
450- }
451-
452- free(configs);
453-
454- b = eglMakeCurrent(d, pbuffer, pbuffer, ctx);
455- if (!b) {
456- printf("make current failed\n");
457- return 0;
458- }
459-
460- b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
461-
462- TestScreens(d);
463-
464- eglDestroySurface(d, pbuffer);
465- eglDestroyContext(d, ctx);
466- eglTerminate(d);
467-
468- return 0;
469-}
470diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c
471deleted file mode 100644
472index bfef59e..0000000
473--- a/src/egl/opengl/demo2.c
474+++ /dev/null
475@@ -1,221 +0,0 @@
476-/*
477- * Exercise EGL API functions
478- */
479-
480-#define EGL_EGLEXT_PROTOTYPES
481-
482-#include <assert.h>
483-#include <stdio.h>
484-#include <stdlib.h>
485-#include <string.h>
486-#include <unistd.h>
487-
488-#include <EGL/egl.h>
489-#include <EGL/eglext.h>
490-#include "gl_wrap.h"
491-
492-/*#define FRONTBUFFER*/
493-
494-#ifdef EGL_MESA_screen_surface
495-static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
496- GLfloat r, GLfloat g, GLfloat b)
497-{
498- GLfloat v[4][2], c[4][4];
499- int i;
500-
501- v[0][0] = x1; v[0][1] = y1;
502- v[1][0] = x2; v[1][1] = y1;
503- v[2][0] = x2; v[2][1] = y2;
504- v[3][0] = x1; v[3][1] = y2;
505-
506- for (i = 0; i < 4; i++) {
507- c[i][0] = r;
508- c[i][1] = g;
509- c[i][2] = b;
510- c[i][3] = 1.0;
511- }
512-
513- glVertexPointer(2, GL_FLOAT, 0, v);
514- glColorPointer(4, GL_FLOAT, 0, c);
515- glEnableClientState(GL_VERTEX_ARRAY);
516- glEnableClientState(GL_COLOR_ARRAY);
517-
518- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
519-
520- glDisableClientState(GL_VERTEX_ARRAY);
521- glDisableClientState(GL_COLOR_ARRAY);
522-}
523-
524-
525-static void redraw(EGLDisplay dpy, EGLSurface surf, int rot)
526-{
527- GLfloat r, g, b;
528-
529- printf("Redraw event\n");
530-
531- glClearColor( rand()/(float)RAND_MAX,
532- rand()/(float)RAND_MAX,
533- rand()/(float)RAND_MAX,
534- 1);
535-
536- glClear( GL_COLOR_BUFFER_BIT );
537-
538- r = rand()/(float)RAND_MAX;
539- g = rand()/(float)RAND_MAX;
540- b = rand()/(float)RAND_MAX;
541-
542- glPushMatrix();
543- glRotatef(rot, 0, 0, 1);
544- glScalef(.5, .5, .5);
545- _subset_Rectf( -1, -1, 1, 1, r, g, b );
546- glPopMatrix();
547-
548-#ifdef FRONTBUFFER
549- glFlush();
550-#else
551- eglSwapBuffers( dpy, surf );
552-#endif
553- glFinish();
554-}
555-
556-
557-/**
558- * Test EGL_MESA_screen_surface functions
559- */
560-static void
561-TestScreens(EGLDisplay dpy)
562-{
563-#define MAX 8
564- EGLScreenMESA screens[MAX];
565- EGLint numScreens;
566- EGLint i;
567-
568- eglGetScreensMESA(dpy, screens, MAX, &numScreens);
569- printf("Found %d screens\n", numScreens);
570- for (i = 0; i < numScreens; i++) {
571- printf(" Screen %d handle: %d\n", i, (int) screens[i]);
572- }
573-}
574-#endif
575-
576-int
577-main(int argc, char *argv[])
578-{
579- int maj, min;
580-#ifdef EGL_MESA_screen_surface
581- EGLContext ctx;
582- EGLSurface pbuffer, screen_surf;
583- EGLConfig configs[10];
584- EGLint numConfigs, i;
585- EGLBoolean b;
586- const EGLint pbufAttribs[] = {
587- EGL_WIDTH, 500,
588- EGL_HEIGHT, 500,
589- EGL_NONE
590- };
591- EGLint screenAttribs[32];
592- EGLModeMESA mode;
593- EGLScreenMESA screen;
594- EGLint count;
595-#endif
596-
597- EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
598- assert(d);
599-
600- if (!eglInitialize(d, &maj, &min)) {
601- printf("demo: eglInitialize failed\n");
602- exit(1);
603- }
604-
605- printf("EGL version = %d.%d\n", maj, min);
606- printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
607- if (!strstr(eglQueryString(d, EGL_EXTENSIONS),
608- "EGL_MESA_screen_surface")) {
609- printf("EGL_MESA_screen_surface is not supported\n");
610- exit(1);
611- }
612-
613-#ifdef EGL_MESA_screen_surface
614- eglGetConfigs(d, configs, 10, &numConfigs);
615- printf("Got %d EGL configs:\n", numConfigs);
616- for (i = 0; i < numConfigs; i++) {
617- EGLint id, red, depth;
618- eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id);
619- eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red);
620- eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth);
621- printf("%2d: Red Size = %d Depth Size = %d\n", id, red, depth);
622- }
623-
624- eglGetScreensMESA(d, &screen, 1, &count);
625- eglGetModesMESA(d, screen, &mode, 1, &count);
626-
627- eglBindAPI(EGL_OPENGL_API);
628- ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
629- if (ctx == EGL_NO_CONTEXT) {
630- printf("failed to create context\n");
631- return 0;
632- }
633-
634- pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs);
635- if (pbuffer == EGL_NO_SURFACE) {
636- printf("failed to create pbuffer\n");
637- return 0;
638- }
639-
640- b = eglMakeCurrent(d, pbuffer, pbuffer, ctx);
641- if (!b) {
642- printf("make current failed\n");
643- return 0;
644- }
645-
646- b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
647-
648- i = 0;
649- screenAttribs[i++] = EGL_WIDTH;
650- eglGetModeAttribMESA(d, mode, EGL_WIDTH, &screenAttribs[i++]);
651- screenAttribs[i++] = EGL_HEIGHT;
652- eglGetModeAttribMESA(d, mode, EGL_HEIGHT, &screenAttribs[i++]);
653- screenAttribs[i] = EGL_NONE;
654-
655- screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
656- if (screen_surf == EGL_NO_SURFACE) {
657- printf("failed to create screen surface\n");
658- return 0;
659- }
660-
661- eglShowScreenSurfaceMESA(d, screen, screen_surf, mode);
662-
663- b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
664- if (!b) {
665- printf("make current failed\n");
666- return 0;
667- }
668-
669- glViewport(0, 0, 1024, 768);
670-
671- glClearColor( 0,
672- 1.0,
673- 0,
674- 1);
675-
676- glClear( GL_COLOR_BUFFER_BIT );
677-
678-
679- TestScreens(d);
680-
681- glShadeModel( GL_FLAT );
682-
683- for (i = 0; i < 6; i++) {
684- redraw(d, screen_surf, i*10 );
685-
686- printf("sleep(1)\n");
687- sleep(1);
688- }
689-
690- eglDestroySurface(d, pbuffer);
691- eglDestroyContext(d, ctx);
692- eglTerminate(d);
693-#endif
694-
695- return 0;
696-}
697diff --git a/src/egl/opengl/demo3.c b/src/egl/opengl/demo3.c
698deleted file mode 100644
699index 31b5d8b..0000000
700--- a/src/egl/opengl/demo3.c
701+++ /dev/null
702@@ -1,652 +0,0 @@
703-/*
704- * Exercise EGL API functions
705- */
706-
707-#define EGL_EGLEXT_PROTOTYPES
708-
709-#include <EGL/egl.h>
710-#include <EGL/eglext.h>
711-#include "gl_wrap.h"
712-#include <assert.h>
713-#include <stdio.h>
714-#include <stdlib.h>
715-#include <string.h>
716-#include <unistd.h>
717-
718-
719-
720-#define PIXEL_CENTER(x) ((long)(x) + 0.5)
721-
722-#define GAP 10
723-#define ROWS 3
724-#define COLS 4
725-
726-#define OPENGL_WIDTH 48
727-#define OPENGL_HEIGHT 13
728-
729-
730-GLenum rgb, doubleBuffer, windType;
731-GLint windW, windH;
732-
733-GLenum mode1, mode2;
734-GLint boxW, boxH;
735-GLubyte OpenGL_bits[] = {
736- 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
737- 0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01,
738- 0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01,
739- 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
740- 0x3e, 0x8f, 0xb7, 0xf9, 0xfc, 0x01,
741- 0x63, 0xdb, 0xb0, 0x8d, 0x0d, 0x00,
742- 0x63, 0xdb, 0xb7, 0x8d, 0x0d, 0x00,
743- 0x63, 0xdb, 0xb6, 0x8d, 0x0d, 0x00,
744- 0x63, 0x8f, 0xf3, 0xcc, 0x0d, 0x00,
745- 0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0a,
746- 0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0e,
747- 0x63, 0x00, 0x00, 0x8c, 0xed, 0x0e,
748- 0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00,
749-};
750-
751-#ifdef EGL_MESA_screen_surface
752-static void Init(void)
753-{
754-
755- mode1 = GL_TRUE;
756- mode2 = GL_TRUE;
757-}
758-
759-static void Reshape(int width, int height)
760-{
761-
762- windW = (GLint)width;
763- windH = (GLint)height;
764-}
765-
766-#if 0
767-static void RotateColorMask(void)
768-{
769- static GLint rotation = 0;
770-
771- rotation = (rotation + 1) & 0x3;
772- switch (rotation) {
773- case 0:
774- glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
775- glIndexMask( 0xff );
776- break;
777- case 1:
778- glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE);
779- glIndexMask(0xFE);
780- break;
781- case 2:
782- glColorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_TRUE);
783- glIndexMask(0xFD);
784- break;
785- case 3:
786- glColorMask(GL_TRUE, GL_TRUE, GL_FALSE, GL_TRUE);
787- glIndexMask(0xFB);
788- break;
789- }
790-}
791-#endif
792-
793-static void Viewport(GLint row, GLint column)
794-{
795- GLint x, y;
796-
797- boxW = (windW - (COLS + 1) * GAP) / COLS;
798- boxH = (windH - (ROWS + 1) * GAP) / ROWS;
799-
800- x = GAP + column * (boxW + GAP);
801- y = GAP + row * (boxH + GAP);
802-
803- glViewport(x, y, boxW, boxH);
804-
805- glMatrixMode(GL_PROJECTION);
806- glLoadIdentity();
807- glOrtho(-boxW/2, boxW/2, -boxH/2, boxH/2, 0.0, 1.0);
808- glMatrixMode(GL_MODELVIEW);
809-
810- glEnable(GL_SCISSOR_TEST);
811- glScissor(x, y, boxW, boxH);
812-}
813-
814-enum {
815- COLOR_BLACK = 0,
816- COLOR_RED,
817- COLOR_GREEN,
818- COLOR_YELLOW,
819- COLOR_BLUE,
820- COLOR_MAGENTA,
821- COLOR_CYAN,
822- COLOR_WHITE
823-};
824-
825-static float RGBMap[9][3] = {
826- {0, 0, 0},
827- {1, 0, 0},
828- {0, 1, 0},
829- {1, 1, 0},
830- {0, 0, 1},
831- {1, 0, 1},
832- {0, 1, 1},
833- {1, 1, 1},
834- {0.5, 0.5, 0.5}
835-};
836-
837-static void SetColor(int c)
838-{
839- glColor3fv(RGBMap[c]);
840-}
841-
842-static void Point(void)
843-{
844- GLint i;
845-
846- glBegin(GL_POINTS);
847- SetColor(COLOR_WHITE);
848- glVertex2i(0, 0);
849- for (i = 1; i < 8; i++) {
850- GLint j = i * 2;
851- SetColor(COLOR_BLACK+i);
852- glVertex2i(-j, -j);
853- glVertex2i(-j, 0);
854- glVertex2i(-j, j);
855- glVertex2i(0, j);
856- glVertex2i(j, j);
857- glVertex2i(j, 0);
858- glVertex2i(j, -j);
859- glVertex2i(0, -j);
860- }
861- glEnd();
862-}
863-
864-static void Lines(void)
865-{
866- GLint i;
867-
868- glPushMatrix();
869-
870- glTranslatef(-12, 0, 0);
871- for (i = 1; i < 8; i++) {
872- SetColor(COLOR_BLACK+i);
873- glBegin(GL_LINES);
874- glVertex2i(-boxW/4, -boxH/4);
875- glVertex2i(boxW/4, boxH/4);
876- glEnd();
877- glTranslatef(4, 0, 0);
878- }
879-
880- glPopMatrix();
881-
882- glBegin(GL_LINES);
883- glVertex2i(0, 0);
884- glEnd();
885-}
886-
887-static void LineStrip(void)
888-{
889-
890- glBegin(GL_LINE_STRIP);
891- SetColor(COLOR_RED);
892- glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4));
893- SetColor(COLOR_GREEN);
894- glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4));
895- SetColor(COLOR_BLUE);
896- glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4));
897- SetColor(COLOR_WHITE);
898- glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4));
899- glEnd();
900-
901- glBegin(GL_LINE_STRIP);
902- glVertex2i(0, 0);
903- glEnd();
904-}
905-
906-static void LineLoop(void)
907-{
908-
909- glBegin(GL_LINE_LOOP);
910- SetColor(COLOR_RED);
911- glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4));
912- SetColor(COLOR_GREEN);
913- glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4));
914- SetColor(COLOR_BLUE);
915- glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4));
916- SetColor(COLOR_WHITE);
917- glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4));
918- glEnd();
919-
920- glEnable(GL_LOGIC_OP);
921- glLogicOp(GL_XOR);
922-
923- glEnable(GL_BLEND);
924- glBlendFunc(GL_ONE, GL_ONE);
925-
926- SetColor(COLOR_MAGENTA);
927- glBegin(GL_LINE_LOOP);
928- glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(-boxH/8));
929- glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8));
930- glEnd();
931- glBegin(GL_LINE_LOOP);
932- glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8+5));
933- glVertex2f(PIXEL_CENTER(boxW/8), PIXEL_CENTER(boxH/8+5));
934- glEnd();
935- glDisable(GL_LOGIC_OP);
936- glDisable(GL_BLEND);
937-
938- SetColor(COLOR_GREEN);
939- glBegin(GL_POINTS);
940- glVertex2i(0, 0);
941- glEnd();
942-
943- glBegin(GL_LINE_LOOP);
944- glVertex2i(0, 0);
945- glEnd();
946-}
947-
948-static void Bitmap(void)
949-{
950-
951- glBegin(GL_LINES);
952- SetColor(COLOR_GREEN);
953- glVertex2i(-boxW/2, 0);
954- glVertex2i(boxW/2, 0);
955- glVertex2i(0, -boxH/2);
956- glVertex2i(0, boxH/2);
957- SetColor(COLOR_RED);
958- glVertex2i(0, -3);
959- glVertex2i(0, -3+OPENGL_HEIGHT);
960- SetColor(COLOR_BLUE);
961- glVertex2i(0, -3);
962- glVertex2i(OPENGL_WIDTH, -3);
963- glEnd();
964-
965- SetColor(COLOR_GREEN);
966-
967- glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);
968- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
969-
970- glRasterPos2i(0, 0);
971- glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, 0, 3, 0.0, 0.0, OpenGL_bits);
972-}
973-
974-static void Triangles(void)
975-{
976-
977- glBegin(GL_TRIANGLES);
978- SetColor(COLOR_GREEN);
979- glVertex2i(-boxW/4, -boxH/4);
980- SetColor(COLOR_RED);
981- glVertex2i(-boxW/8, -boxH/16);
982- SetColor(COLOR_BLUE);
983- glVertex2i(boxW/8, -boxH/16);
984-
985- SetColor(COLOR_GREEN);
986- glVertex2i(-boxW/4, boxH/4);
987- SetColor(COLOR_RED);
988- glVertex2i(-boxW/8, boxH/16);
989- SetColor(COLOR_BLUE);
990- glVertex2i(boxW/8, boxH/16);
991- glEnd();
992-
993- glBegin(GL_TRIANGLES);
994- glVertex2i(0, 0);
995- glVertex2i(-100, 100);
996- glEnd();
997-}
998-
999-static void TriangleStrip(void)
1000-{
1001-
1002- glBegin(GL_TRIANGLE_STRIP);
1003- SetColor(COLOR_GREEN);
1004- glVertex2i(-boxW/4, -boxH/4);
1005- SetColor(COLOR_RED);
1006- glVertex2i(-boxW/4, boxH/4);
1007- SetColor(COLOR_BLUE);
1008- glVertex2i(0, -boxH/4);
1009- SetColor(COLOR_WHITE);
1010- glVertex2i(0, boxH/4);
1011- SetColor(COLOR_CYAN);
1012- glVertex2i(boxW/4, -boxH/4);
1013- SetColor(COLOR_YELLOW);
1014- glVertex2i(boxW/4, boxH/4);
1015- glEnd();
1016-
1017- glBegin(GL_TRIANGLE_STRIP);
1018- glVertex2i(0, 0);
1019- glVertex2i(-100, 100);
1020- glEnd();
1021-}
1022-
1023-static void TriangleFan(void)
1024-{
1025- GLint vx[8][2];
1026- GLint x0, y0, x1, y1, x2, y2, x3, y3;
1027- GLint i;
1028-
1029- y0 = -boxH/4;
1030- y1 = y0 + boxH/2/3;
1031- y2 = y1 + boxH/2/3;
1032- y3 = boxH/4;
1033- x0 = -boxW/4;
1034- x1 = x0 + boxW/2/3;
1035- x2 = x1 + boxW/2/3;
1036- x3 = boxW/4;
1037-
1038- vx[0][0] = x0; vx[0][1] = y1;
1039- vx[1][0] = x0; vx[1][1] = y2;
1040- vx[2][0] = x1; vx[2][1] = y3;
1041- vx[3][0] = x2; vx[3][1] = y3;
1042- vx[4][0] = x3; vx[4][1] = y2;
1043- vx[5][0] = x3; vx[5][1] = y1;
1044- vx[6][0] = x2; vx[6][1] = y0;
1045- vx[7][0] = x1; vx[7][1] = y0;
1046-
1047- glBegin(GL_TRIANGLE_FAN);
1048- SetColor(COLOR_WHITE);
1049- glVertex2i(0, 0);
1050- for (i = 0; i < 8; i++) {
1051- SetColor(COLOR_WHITE-i);
1052- glVertex2iv(vx[i]);
1053- }
1054- glEnd();
1055-
1056- glBegin(GL_TRIANGLE_FAN);
1057- glVertex2i(0, 0);
1058- glVertex2i(-100, 100);
1059- glEnd();
1060-}
1061-
1062-static void Rect(void)
1063-{
1064-
1065- SetColor(COLOR_GREEN);
1066- glRecti(-boxW/4, -boxH/4, boxW/4, boxH/4);
1067-}
1068-
1069-static void PolygonFunc(void)
1070-{
1071- GLint vx[8][2];
1072- GLint x0, y0, x1, y1, x2, y2, x3, y3;
1073- GLint i;
1074-
1075- y0 = -boxH/4;
1076- y1 = y0 + boxH/2/3;
1077- y2 = y1 + boxH/2/3;
1078- y3 = boxH/4;
1079- x0 = -boxW/4;
1080- x1 = x0 + boxW/2/3;
1081- x2 = x1 + boxW/2/3;
1082- x3 = boxW/4;
1083-
1084- vx[0][0] = x0; vx[0][1] = y1;
1085- vx[1][0] = x0; vx[1][1] = y2;
1086- vx[2][0] = x1; vx[2][1] = y3;
1087- vx[3][0] = x2; vx[3][1] = y3;
1088- vx[4][0] = x3; vx[4][1] = y2;
1089- vx[5][0] = x3; vx[5][1] = y1;
1090- vx[6][0] = x2; vx[6][1] = y0;
1091- vx[7][0] = x1; vx[7][1] = y0;
1092-
1093- glBegin(GL_POLYGON);
1094- for (i = 0; i < 8; i++) {
1095- SetColor(COLOR_WHITE-i);
1096- glVertex2iv(vx[i]);
1097- }
1098- glEnd();
1099-
1100- glBegin(GL_POLYGON);
1101- glVertex2i(0, 0);
1102- glVertex2i(100, 100);
1103- glEnd();
1104-}
1105-
1106-static void Quads(void)
1107-{
1108-
1109- glBegin(GL_QUADS);
1110- SetColor(COLOR_GREEN);
1111- glVertex2i(-boxW/4, -boxH/4);
1112- SetColor(COLOR_RED);
1113- glVertex2i(-boxW/8, -boxH/16);
1114- SetColor(COLOR_BLUE);
1115- glVertex2i(boxW/8, -boxH/16);
1116- SetColor(COLOR_WHITE);
1117- glVertex2i(boxW/4, -boxH/4);
1118-
1119- SetColor(COLOR_GREEN);
1120- glVertex2i(-boxW/4, boxH/4);
1121- SetColor(COLOR_RED);
1122- glVertex2i(-boxW/8, boxH/16);
1123- SetColor(COLOR_BLUE);
1124- glVertex2i(boxW/8, boxH/16);
1125- SetColor(COLOR_WHITE);
1126- glVertex2i(boxW/4, boxH/4);
1127- glEnd();
1128-
1129- glBegin(GL_QUADS);
1130- glVertex2i(0, 0);
1131- glVertex2i(100, 100);
1132- glVertex2i(-100, 100);
1133- glEnd();
1134-}
1135-
1136-static void QuadStrip(void)
1137-{
1138-
1139- glBegin(GL_QUAD_STRIP);
1140- SetColor(COLOR_GREEN);
1141- glVertex2i(-boxW/4, -boxH/4);
1142- SetColor(COLOR_RED);
1143- glVertex2i(-boxW/4, boxH/4);
1144- SetColor(COLOR_BLUE);
1145- glVertex2i(0, -boxH/4);
1146- SetColor(COLOR_WHITE);
1147- glVertex2i(0, boxH/4);
1148- SetColor(COLOR_CYAN);
1149- glVertex2i(boxW/4, -boxH/4);
1150- SetColor(COLOR_YELLOW);
1151- glVertex2i(boxW/4, boxH/4);
1152- glEnd();
1153-
1154- glBegin(GL_QUAD_STRIP);
1155- glVertex2i(0, 0);
1156- glVertex2i(100, 100);
1157- glVertex2i(-100, 100);
1158- glEnd();
1159-}
1160-
1161-static void Draw(EGLDisplay dpy, EGLSurface surf)
1162-{
1163-
1164- glViewport(0, 0, windW, windH);
1165- glDisable(GL_SCISSOR_TEST);
1166-
1167- glPushAttrib(GL_COLOR_BUFFER_BIT);
1168-
1169- glColorMask(1, 1, 1, 1);
1170- glIndexMask(~0);
1171-
1172- glClearColor(0.0, 0.0, 0.0, 0.0);
1173- glClear(GL_COLOR_BUFFER_BIT);
1174-
1175- glPopAttrib();
1176-
1177- if (mode1) {
1178- glShadeModel(GL_SMOOTH);
1179- } else {
1180- glShadeModel(GL_FLAT);
1181- }
1182-
1183- if (mode2) {
1184- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
1185- } else {
1186- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
1187- }
1188-
1189- Viewport(0, 0); Point();
1190- Viewport(0, 1); Lines();
1191- Viewport(0, 2); LineStrip();
1192- Viewport(0, 3); LineLoop();
1193-
1194- Viewport(1, 0); Bitmap();
1195-
1196- Viewport(1, 1); TriangleFan();
1197- Viewport(1, 2); Triangles();
1198- Viewport(1, 3); TriangleStrip();
1199-
1200- Viewport(2, 0); Rect();
1201- Viewport(2, 1); PolygonFunc();
1202- Viewport(2, 2); Quads();
1203- Viewport(2, 3); QuadStrip();
1204-
1205- glFlush();
1206-
1207- if (doubleBuffer) {
1208- eglSwapBuffers(dpy, surf);
1209- }
1210-}
1211-
1212-static void
1213-write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
1214-{
1215- const int binary = 0;
1216- FILE *f = fopen( filename, "w" );
1217- if (f) {
1218- int i, x, y;
1219- const GLubyte *ptr = buffer;
1220- if (binary) {
1221- fprintf(f,"P6\n");
1222- fprintf(f,"# ppm-file created by osdemo.c\n");
1223- fprintf(f,"%i %i\n", width,height);
1224- fprintf(f,"255\n");
1225- fclose(f);
1226- f = fopen( filename, "ab" ); /* reopen in binary append mode */
1227- for (y=height-1; y>=0; y--) {
1228- for (x=0; x<width; x++) {
1229- i = (y*width + x) * 4;
1230- fputc(ptr[i], f); /* write red */
1231- fputc(ptr[i+1], f); /* write green */
1232- fputc(ptr[i+2], f); /* write blue */
1233- }
1234- }
1235- }
1236- else {
1237- /*ASCII*/
1238- int counter = 0;
1239- fprintf(f,"P3\n");
1240- fprintf(f,"# ascii ppm file created by osdemo.c\n");
1241- fprintf(f,"%i %i\n", width, height);
1242- fprintf(f,"255\n");
1243- for (y=height-1; y>=0; y--) {
1244- for (x=0; x<width; x++) {
1245- i = (y*width + x) * 4;
1246- fprintf(f, " %3d %3d %3d", ptr[i], ptr[i+1], ptr[i+2]);
1247- counter++;
1248- if (counter % 5 == 0)
1249- fprintf(f, "\n");
1250- }
1251- }
1252- }
1253- fclose(f);
1254- }
1255-}
1256-#endif
1257-
1258-int
1259-main(int argc, char *argv[])
1260-{
1261- int maj, min;
1262-#ifdef EGL_MESA_screen_surface
1263- EGLContext ctx;
1264- EGLSurface screen_surf;
1265- EGLConfig configs[10];
1266- EGLScreenMESA screen;
1267- EGLModeMESA mode;
1268- EGLint numConfigs, count;
1269- EGLBoolean b;
1270- const GLubyte *bitmap;
1271- EGLint screenAttribs[32];
1272- EGLint i;
1273-#endif
1274-
1275- EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
1276- assert(d);
1277-
1278- if (!eglInitialize(d, &maj, &min)) {
1279- printf("demo: eglInitialize failed\n");
1280- exit(1);
1281- }
1282-
1283- printf("EGL version = %d.%d\n", maj, min);
1284- printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
1285- if (!strstr(eglQueryString(d, EGL_EXTENSIONS),
1286- "EGL_MESA_screen_surface")) {
1287- printf("EGL_MESA_screen_surface is not supported\n");
1288- exit(1);
1289- }
1290-
1291-#ifdef EGL_MESA_screen_surface
1292- eglGetConfigs(d, configs, 10, &numConfigs);
1293- eglGetScreensMESA(d, &screen, 1, &count);
1294- eglGetModesMESA(d, screen, &mode, 1, &count);
1295-
1296- eglBindAPI(EGL_OPENGL_API);
1297- ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
1298- if (ctx == EGL_NO_CONTEXT) {
1299- printf("failed to create context\n");
1300- return 0;
1301- }
1302-
1303- i = 0;
1304- screenAttribs[i++] = EGL_WIDTH;
1305- eglGetModeAttribMESA(d, mode, EGL_WIDTH, &screenAttribs[i++]);
1306- screenAttribs[i++] = EGL_HEIGHT;
1307- eglGetModeAttribMESA(d, mode, EGL_HEIGHT, &screenAttribs[i++]);
1308- screenAttribs[i] = EGL_NONE;
1309-
1310- screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
1311- if (screen_surf == EGL_NO_SURFACE) {
1312- printf("failed to create screen surface\n");
1313- return 0;
1314- }
1315-
1316- eglShowScreenSurfaceMESA(d, screen, screen_surf, mode);
1317-
1318- b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
1319- if (!b) {
1320- printf("make current failed\n");
1321- return 0;
1322- }
1323- glViewport(0, 0, 1024, 768);
1324-
1325-
1326- Init();
1327- Reshape(1024, 768);
1328-
1329- /* some drivers crash when rendering to front buffer */
1330-#if 0
1331- glDrawBuffer( GL_FRONT );
1332- glClearColor( 0, 1.0, 0, 1);
1333-
1334- glClear( GL_COLOR_BUFFER_BIT );
1335-#endif
1336-
1337- doubleBuffer = 1;
1338- glDrawBuffer( GL_BACK );
1339-
1340- Draw(d, screen_surf);
1341- sleep(2);
1342-
1343- /* TODO EGL_KHR_lock_surface */
1344- bitmap = NULL;
1345- if (bitmap)
1346- write_ppm("dump.ppm", bitmap, 1024, 768);
1347-
1348- eglDestroySurface(d, screen_surf);
1349- eglDestroyContext(d, ctx);
1350- eglTerminate(d);
1351-#endif
1352-
1353- return 0;
1354-}
1355diff --git a/src/egl/opengl/eglinfo.c b/src/egl/opengl/eglinfo.c
1356index 8e82e73..1f79fef 100644
1357--- a/src/egl/opengl/eglinfo.c
1358+++ b/src/egl/opengl/eglinfo.c
1359@@ -93,10 +93,6 @@ PrintConfigs(EGLDisplay d)
1360 strcat(surfString, "pb,");
1361 if (surfaces & EGL_PIXMAP_BIT)
1362 strcat(surfString, "pix,");
1363-#ifdef EGL_MESA_screen_surface
1364- if (surfaces & EGL_SCREEN_BIT_MESA)
1365- strcat(surfString, "scrn,");
1366-#endif
1367 if (strlen(surfString) > 0)
1368 surfString[strlen(surfString) - 1] = 0;
1369
1370@@ -117,45 +113,6 @@ PrintConfigs(EGLDisplay d)
1371 }
1372
1373
1374-/**
1375- * Print table of all available configurations.
1376- */
1377-static void
1378-PrintModes(EGLDisplay d)
1379-{
1380-#ifdef EGL_MESA_screen_surface
1381- const char *extensions = eglQueryString(d, EGL_EXTENSIONS);
1382- if (strstr(extensions, "EGL_MESA_screen_surface")) {
1383- EGLScreenMESA screens[MAX_SCREENS];
1384- EGLint numScreens = 1, scrn;
1385- EGLModeMESA modes[MAX_MODES];
1386-
1387- eglGetScreensMESA(d, screens, MAX_SCREENS, &numScreens);
1388- printf("Number of Screens: %d\n\n", numScreens);
1389-
1390- for (scrn = 0; scrn < numScreens; scrn++) {
1391- EGLint numModes, i;
1392-
1393- eglGetModesMESA(d, screens[scrn], modes, MAX_MODES, &numModes);
1394-
1395- printf("Screen %d Modes:\n", scrn);
1396- printf(" id width height refresh name\n");
1397- printf("-----------------------------------------\n");
1398- for (i = 0; i < numModes; i++) {
1399- EGLint id, w, h, r;
1400- const char *str;
1401- eglGetModeAttribMESA(d, modes[i], EGL_MODE_ID_MESA, &id);
1402- eglGetModeAttribMESA(d, modes[i], EGL_WIDTH, &w);
1403- eglGetModeAttribMESA(d, modes[i], EGL_HEIGHT, &h);
1404- eglGetModeAttribMESA(d, modes[i], EGL_REFRESH_RATE_MESA, &r);
1405- str = eglQueryModeStringMESA(d, modes[i]);
1406- printf("0x%02x %5d %5d %.3f %s\n", id, w, h, r / 1000.0, str);
1407- }
1408- }
1409- }
1410-#endif
1411-}
1412-
1413 static void
1414 PrintExtensions(EGLDisplay d)
1415 {
1416@@ -215,8 +172,6 @@ main(int argc, char *argv[])
1417
1418 PrintConfigs(d);
1419
1420- PrintModes(d);
1421-
1422 eglTerminate(d);
1423
1424 return 0;
1425diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
1426index 516e516..1cc2e1f 100644
1427--- a/src/egl/opengles1/Makefile.am
1428+++ b/src/egl/opengles1/Makefile.am
1429@@ -38,24 +38,6 @@ AM_LDFLAGS = \
1430
1431 bin_PROGRAMS =
1432
1433-if HAVE_EGL
1434-if HAVE_GLESV1
1435-bin_PROGRAMS += \
1436- drawtex_screen \
1437- gears_screen \
1438- torus_screen \
1439- tri_screen
1440-
1441-drawtex_screen_SOURCES = drawtex.c
1442-gears_screen_SOURCES = gears.c
1443-torus_screen_SOURCES = torus.c
1444-tri_screen_SOURCES = tri.c
1445-
1446-drawtex_screen_LDADD = ../eglut/libeglut_screen.la
1447-gears_screen_LDADD = ../eglut/libeglut_screen.la
1448-torus_screen_LDADD = ../eglut/libeglut_screen.la
1449-tri_screen_LDADD = ../eglut/libeglut_screen.la
1450-
1451 if HAVE_X11
1452 bin_PROGRAMS += \
1453 clear \
1454@@ -94,5 +76,3 @@ gears_x11_LDADD = ../eglut/libeglut_x11.la
1455 torus_x11_LDADD = ../eglut/libeglut_x11.la
1456 tri_x11_LDADD = ../eglut/libeglut_x11.la
1457 endif
1458-endif
1459-endif
1460diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am
1461index 74af460..422cb03 100644
1462--- a/src/egl/opengles2/Makefile.am
1463+++ b/src/egl/opengles2/Makefile.am
1464@@ -33,13 +33,7 @@ AM_LDFLAGS = \
1465 $(EGL_LIBS) \
1466 -lm
1467
1468-if HAVE_EGL
1469-if HAVE_GLESV2
1470-bin_PROGRAMS = \
1471- es2gears_screen
1472-
1473-es2gears_screen_SOURCES = es2gears.c
1474-es2gears_screen_LDADD = ../eglut/libeglut_screen.la
1475+bin_PROGRAMS =
1476
1477 if HAVE_WAYLAND
1478 bin_PROGRAMS += es2gears_wayland
1479@@ -59,6 +53,4 @@ es2gears_x11_SOURCES = es2gears.c
1480 es2gears_x11_LDADD = ../eglut/libeglut_x11.la
1481 es2tri_LDADD = $(X11_LIBS)
1482 endif
1483-endif
1484-endif
1485
1486diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
1487index b545225..5fd1cf8 100644
1488--- a/src/egl/openvg/Makefile.am
1489+++ b/src/egl/openvg/Makefile.am
1490@@ -50,21 +50,13 @@ endif
1491 if HAVE_EGL
1492 if HAVE_VG
1493 bin_PROGRAMS = \
1494- lion_screen \
1495- sp_screen \
1496 $(EGL_X11_DEMOS)
1497 endif
1498 endif
1499
1500-lion_screen_SOURCES = lion.c lion-render.c lion-render.h
1501-sp_screen_SOURCES = sp.c
1502-
1503 lion_x11_SOURCES = lion.c lion-render.c lion-render.h
1504 sp_x11_SOURCES = sp.c
1505
1506-lion_screen_LDADD = ../eglut/libeglut_screen.la
1507-sp_screen_LDADD = ../eglut/libeglut_screen.la
1508-
1509 lion_x11_LDADD = ../eglut/libeglut_x11.la
1510 sp_x11_LDADD = ../eglut/libeglut_x11.la
1511
1512diff --git a/src/egl/openvg/Makefile.in b/src/egl/openvg/Makefile.in
1513index 99e9288..3652fbb 100644
1514--- a/src/egl/openvg/Makefile.in
1515+++ b/src/egl/openvg/Makefile.in
1516@@ -108,8 +108,6 @@ host_triplet = @host@
1517 @HAVE_FREETYPE2_TRUE@@HAVE_X11_TRUE@am__append_1 = \
1518 @HAVE_FREETYPE2_TRUE@@HAVE_X11_TRUE@ text
1519
1520-@HAVE_EGL_TRUE@@HAVE_VG_TRUE@noinst_PROGRAMS = lion_screen$(EXEEXT) \
1521-@HAVE_EGL_TRUE@@HAVE_VG_TRUE@ sp_screen$(EXEEXT) \
1522 @HAVE_EGL_TRUE@@HAVE_VG_TRUE@ $(am__EXEEXT_2)
1523 subdir = src/egl/openvg
1524 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
1525@@ -128,9 +126,6 @@ CONFIG_CLEAN_VPATH_FILES =
1526 @HAVE_X11_TRUE@am__EXEEXT_2 = lion_x11$(EXEEXT) sp_x11$(EXEEXT) \
1527 @HAVE_X11_TRUE@ $(am__EXEEXT_1)
1528 PROGRAMS = $(noinst_PROGRAMS)
1529-am_lion_screen_OBJECTS = lion.$(OBJEXT) lion-render.$(OBJEXT)
1530-lion_screen_OBJECTS = $(am_lion_screen_OBJECTS)
1531-lion_screen_DEPENDENCIES = ../eglut/libeglut_screen.la
1532 AM_V_lt = $(am__v_lt_@AM_V@)
1533 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
1534 am__v_lt_0 = --silent
1535@@ -138,9 +133,6 @@ am__v_lt_1 =
1536 am_lion_x11_OBJECTS = lion.$(OBJEXT) lion-render.$(OBJEXT)
1537 lion_x11_OBJECTS = $(am_lion_x11_OBJECTS)
1538 lion_x11_DEPENDENCIES = ../eglut/libeglut_x11.la
1539-am_sp_screen_OBJECTS = sp.$(OBJEXT)
1540-sp_screen_OBJECTS = $(am_sp_screen_OBJECTS)
1541-sp_screen_DEPENDENCIES = ../eglut/libeglut_screen.la
1542 am_sp_x11_OBJECTS = sp.$(OBJEXT)
1543 sp_x11_OBJECTS = $(am_sp_x11_OBJECTS)
1544 sp_x11_DEPENDENCIES = ../eglut/libeglut_x11.la
1545@@ -184,10 +176,10 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
1546 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
1547 am__v_CCLD_0 = @echo " CCLD " $@;
1548 am__v_CCLD_1 =
1549-SOURCES = $(lion_screen_SOURCES) $(lion_x11_SOURCES) \
1550- $(sp_screen_SOURCES) $(sp_x11_SOURCES) $(text_SOURCES)
1551-DIST_SOURCES = $(lion_screen_SOURCES) $(lion_x11_SOURCES) \
1552- $(sp_screen_SOURCES) $(sp_x11_SOURCES) $(text_SOURCES)
1553+SOURCES = $(lion_x11_SOURCES) \
1554+ $(sp_x11_SOURCES) $(text_SOURCES)
1555+DIST_SOURCES = $(lion_x11_SOURCES) \
1556+ $(sp_x11_SOURCES) $(text_SOURCES)
1557 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
1558 ctags-recursive dvi-recursive html-recursive info-recursive \
1559 install-data-recursive install-dvi-recursive \
1560@@ -423,12 +415,8 @@ AM_LDFLAGS = \
1561 -lm
1562
1563 @HAVE_X11_TRUE@EGL_X11_DEMOS = lion_x11 sp_x11 $(am__append_1)
1564-lion_screen_SOURCES = lion.c lion-render.c lion-render.h
1565-sp_screen_SOURCES = sp.c
1566 lion_x11_SOURCES = lion.c lion-render.c lion-render.h
1567 sp_x11_SOURCES = sp.c
1568-lion_screen_LDADD = ../eglut/libeglut_screen.la
1569-sp_screen_LDADD = ../eglut/libeglut_screen.la
1570 lion_x11_LDADD = ../eglut/libeglut_x11.la
1571 sp_x11_LDADD = ../eglut/libeglut_x11.la
1572 text_SOURCES = text.c
1573@@ -481,18 +469,10 @@ clean-noinstPROGRAMS:
1574 echo " rm -f" $$list; \
1575 rm -f $$list
1576
1577-lion_screen$(EXEEXT): $(lion_screen_OBJECTS) $(lion_screen_DEPENDENCIES) $(EXTRA_lion_screen_DEPENDENCIES)
1578- @rm -f lion_screen$(EXEEXT)
1579- $(AM_V_CCLD)$(LINK) $(lion_screen_OBJECTS) $(lion_screen_LDADD) $(LIBS)
1580-
1581 lion_x11$(EXEEXT): $(lion_x11_OBJECTS) $(lion_x11_DEPENDENCIES) $(EXTRA_lion_x11_DEPENDENCIES)
1582 @rm -f lion_x11$(EXEEXT)
1583 $(AM_V_CCLD)$(LINK) $(lion_x11_OBJECTS) $(lion_x11_LDADD) $(LIBS)
1584
1585-sp_screen$(EXEEXT): $(sp_screen_OBJECTS) $(sp_screen_DEPENDENCIES) $(EXTRA_sp_screen_DEPENDENCIES)
1586- @rm -f sp_screen$(EXEEXT)
1587- $(AM_V_CCLD)$(LINK) $(sp_screen_OBJECTS) $(sp_screen_LDADD) $(LIBS)
1588-
1589 sp_x11$(EXEEXT): $(sp_x11_OBJECTS) $(sp_x11_DEPENDENCIES) $(EXTRA_sp_x11_DEPENDENCIES)
1590 @rm -f sp_x11$(EXEEXT)
1591 $(AM_V_CCLD)$(LINK) $(sp_x11_OBJECTS) $(sp_x11_LDADD) $(LIBS)
1592
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
index 53bd5e2b41..ee0bb020a3 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
@@ -10,22 +10,17 @@ LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=9142
10 file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06" 10 file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
11 11
12SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \ 12SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
13 file://0001-mesa-demos-Add-missing-data-files.patch \ 13 file://0001-mesa-demos-Add-missing-data-files.patch \
14 file://0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch \ 14 file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
15 file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \ 15 file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
16 file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \ 16 file://0007-Install-few-more-test-programs.patch \
17 file://0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch \ 17 file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
18 file://0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch \ 18 file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
19 file://0007-Install-few-more-test-programs.patch \ 19 file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
20 file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \ 20 file://0013-only-build-GLX-demos-if-needed.patch \
21 file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \ 21 "
22 file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \ 22SRC_URI[md5sum] = "628e75c23c17394f11a316c36f8e4164"
23 file://0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch \ 23SRC_URI[sha256sum] = "c173154bbd0d5fb53d732471984def42fb1b14ac85fcb834138fb9518b3e0bef"
24 file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
25 file://0013-only-build-GLX-demos-if-needed.patch \
26"
27SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
28SRC_URI[sha256sum] = "e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
29 24
30inherit autotools pkgconfig distro_features_check 25inherit autotools pkgconfig distro_features_check
31# depends on virtual/egl, virtual/libgl ... 26# depends on virtual/egl, virtual/libgl ...