diff options
| author | Jussi Kukkonen <jussi.kukkonen@intel.com> | 2016-05-23 15:44:07 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-25 07:49:54 +0100 |
| commit | 747762233ee21eaaf480f19b85cd1d6543c7ca51 (patch) | |
| tree | db3e5ed31d557e8a669eb0dc41e6b910f80607dc | |
| parent | 13f09065c93a5c04984dbe00fef0a1d71f56d5e0 (diff) | |
| download | openembedded-core-747762233ee21eaaf480f19b85cd1d6543c7ca51.tar.gz openembedded-core-747762233ee21eaaf480f19b85cd1d6543c7ca51.tar.bz2 openembedded-core-747762233ee21eaaf480f19b85cd1d6543c7ca51.zip | |
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.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 @@ -From 36829a8d7ad2888515fbee95c2a70b3d636d7538 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Wed, 9 Jul 2014 14:30:33 +0200 -Subject: [PATCH 2/9] Correctly implement with AC_WITH(glut) so that - --without-glut works. - -Signed-off-by: Ross Burton <ross.burton@intel.com> -Upstream-Status: Submitted (https://patchwork.freedesktop.org/patch/64417/) - ---- - configure.ac | 26 +++++++++++++++----------- - 1 file changed, 15 insertions(+), 11 deletions(-) - -diff --git a/configure.ac b/configure.ac -index c4ee12b..9445424 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -67,21 +67,25 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS" - DEMO_LIBS="$DEMO_LIBS $GL_LIBS" - - dnl Check for GLUT --GLUT_CFLAGS="" --GLUT_LIBS=-lglut --glut_enabled=yes -+glut_enabled=no - AC_ARG_WITH([glut], - [AS_HELP_STRING([--with-glut=DIR], - [glut install directory])], - [GLUT_CFLAGS="-I$withval/include" -- GLUT_LIBS="-L$withval/lib -lglut"]) --AC_CHECK_HEADER([GL/glut.h], -- [], -- [glut_enabled=no]) --AC_CHECK_LIB([glut], -- [glutInit], -- [], -- [glut_enabled=no]) -+ GLUT_LIBS="-L$withval/lib -lglut"], -+ [GLUT_CFLAGS="" -+ GLUT_LIBS="-lglut"] -+ ) -+AS_IF([test "x$with_glut" != xno], -+ [AC_CHECK_HEADER([GL/glut.h], -+ [], -+ [glut_enabled=no]) -+ AC_CHECK_LIB([glut], -+ [glutInit], -+ [], -+ [glut_enabled=no]) -+ glut_enabled=yes -+]) - - dnl Check for FreeGLUT 2.6 or later - AC_EGREP_HEADER([glutInitContextProfile], --- -2.0.0 - 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 @@ -From b25e9c675cf560b8b037dc855c6b3b1d09957867 Mon Sep 17 00:00:00 2001 +From 779438770bedf3d53e6ad8f7cd6889b7f50daf3b Mon Sep 17 00:00:00 2001 From: Martin Jansa <Martin.Jansa@gmail.com> Date: Wed, 9 Jul 2014 14:23:41 +0200 -Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or - GLU +Subject: [PATCH] configure: Allow to disable demos which require GLEW or GLU * in some systems without X11 support we don't have GLEW, but mesa-demos are still useful @@ -10,17 +9,20 @@ Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or Upstream-Status: Pending Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +Port to 8.3.0 +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> --- configure.ac | 49 ++++++++++++++++++++--------- - src/Makefile.am | 14 ++++++--- + src/Makefile.am | 18 ++++++++--- src/demos/Makefile.am | 73 ++++++++++++++++++++++++------------------- src/egl/Makefile.am | 8 +++-- - src/egl/opengles1/Makefile.am | 44 +++++++++++++++----------- - src/egl/opengles2/Makefile.am | 33 ++++++++++--------- - 6 files changed, 135 insertions(+), 86 deletions(-) + src/egl/opengles1/Makefile.am | 10 ++++-- + src/egl/opengles2/Makefile.am | 29 ++++++++--------- + 6 files changed, 117 insertions(+), 70 deletions(-) diff --git a/configure.ac b/configure.ac -index 9445424..bc4c8d1 100644 +index 0525b09..28834cd 100644 --- a/configure.ac +++ b/configure.ac @@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile], @@ -92,10 +94,11 @@ index 9445424..bc4c8d1 100644 AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes") AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes") diff --git a/src/Makefile.am b/src/Makefile.am -index 1647d64..754c47c 100644 +index 1647d64..8b89dee 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -23,14 +23,18 @@ +@@ -22,15 +22,19 @@ + # Authors: # Eric Anholt <eric@anholt.net> +if HAVE_GLEW @@ -116,7 +119,7 @@ index 1647d64..754c47c 100644 objviewer \ osdemos \ perf \ -@@ -40,8 +39,12 @@ SUBDIRS = \ +@@ -40,8 +44,12 @@ SUBDIRS = \ slang \ tests \ tools \ @@ -289,10 +292,10 @@ index d64a49e..4fe1ca8 100644 + openvg +endif diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am -index 7a9828d..3455e75 100644 +index fa397c2..21853e8 100644 --- a/src/egl/opengles1/Makefile.am +++ b/src/egl/opengles1/Makefile.am -@@ -36,28 +36,43 @@ AM_LDFLAGS = \ +@@ -36,9 +36,12 @@ AM_LDFLAGS = \ $(EGL_LIBS) \ -lm @@ -301,42 +304,13 @@ index 7a9828d..3455e75 100644 if HAVE_EGL if HAVE_GLESV1 -noinst_PROGRAMS = \ -- bindtex \ -- clear \ -+noinst_PROGRAMS += \ - drawtex_screen \ -+ gears_screen \ -+ torus_screen \ -+ tri_screen -+ -+drawtex_screen_SOURCES = drawtex.c -+gears_screen_SOURCES = gears.c -+torus_screen_SOURCES = torus.c -+tri_screen_SOURCES = tri.c -+ -+drawtex_screen_LDADD = ../eglut/libeglut_screen.la -+gears_screen_LDADD = ../eglut/libeglut_screen.la -+torus_screen_LDADD = ../eglut/libeglut_screen.la -+tri_screen_LDADD = ../eglut/libeglut_screen.la -+ +if HAVE_X11 -+noinst_PROGRAMS += \ -+ clear -+ +bin_PROGRAMS = \ -+ bindtex \ + bindtex \ + clear \ drawtex_x11 \ - eglfbdev \ - es1_info \ -- gears_screen \ - gears_x11 \ - msaa \ - pbuffer\ - render_tex \ - texture_from_pixmap \ -- torus_screen \ +@@ -52,8 +55,6 @@ noinst_PROGRAMS = \ torus_x11 \ -- tri_screen \ tri_x11 \ two_win -endif @@ -344,26 +318,7 @@ index 7a9828d..3455e75 100644 bindtex_LDADD = $(X11_LIBS) es1_info_LDADD = $(X11_LIBS) -@@ -71,22 +86,15 @@ two_win_LDADD = $(X11_LIBS) - clear_LDADD = ../eglut/libeglut_x11.la $(EGL_LIBS) $(X11_LIBS) - clear_LDFLAGS = - --drawtex_screen_SOURCES = drawtex.c --gears_screen_SOURCES = gears.c --torus_screen_SOURCES = torus.c --tri_screen_SOURCES = tri.c -- - drawtex_x11_SOURCES = drawtex.c - gears_x11_SOURCES = gears.c - torus_x11_SOURCES = torus.c - tri_x11_SOURCES = tri.c - --drawtex_screen_LDADD = ../eglut/libeglut_screen.la --gears_screen_LDADD = ../eglut/libeglut_screen.la --torus_screen_LDADD = ../eglut/libeglut_screen.la --tri_screen_LDADD = ../eglut/libeglut_screen.la -- - drawtex_x11_LDADD = ../eglut/libeglut_x11.la +@@ -76,3 +77,6 @@ drawtex_x11_LDADD = ../eglut/libeglut_x11.la gears_x11_LDADD = ../eglut/libeglut_x11.la torus_x11_LDADD = ../eglut/libeglut_x11.la tri_x11_LDADD = ../eglut/libeglut_x11.la @@ -371,35 +326,35 @@ index 7a9828d..3455e75 100644 +endif +endif diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am -index 41c1b80..74af460 100644 +index b80ba50..17f8d49 100644 --- a/src/egl/opengles2/Makefile.am +++ b/src/egl/opengles2/Makefile.am -@@ -36,26 +36,29 @@ AM_LDFLAGS = \ +@@ -33,27 +33,28 @@ AM_LDFLAGS = \ + $(EGL_LIBS) \ + -lm + ++bin_PROGRAMS = ++ if HAVE_EGL if HAVE_GLESV2 - bin_PROGRAMS = \ +-bin_PROGRAMS = +-if HAVE_X11 +-bin_PROGRAMS += \ - es2_info \ -- es2gears_screen \ - es2gears_x11 \ - es2tri -+ es2gears_screen -+ -+es2gears_screen_SOURCES = es2gears.c -+es2gears_screen_LDADD = ../eglut/libeglut_screen.la -+ +-endif if HAVE_WAYLAND bin_PROGRAMS += es2gears_wayland -endif -endif --endif - --es2_info_LDADD = $(X11_LIBS) --es2tri_LDADD = $(X11_LIBS) ++ +es2gears_wayland_SOURCES = es2gears.c +es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la -+endif + endif --es2gears_screen_SOURCES = es2gears.c +-es2_info_LDADD = $(X11_LIBS) +-es2tri_LDADD = $(X11_LIBS) +if HAVE_X11 +bin_PROGRAMS += \ + es2tri \ @@ -409,8 +364,6 @@ index 41c1b80..74af460 100644 +es2_info_LDADD = $(X11_LIBS) es2gears_x11_SOURCES = es2gears.c - --es2gears_screen_LDADD = ../eglut/libeglut_screen.la -- es2gears_x11_LDADD = ../eglut/libeglut_x11.la +es2tri_LDADD = $(X11_LIBS) +endif @@ -420,5 +373,5 @@ index 41c1b80..74af460 100644 -es2gears_wayland_SOURCES = es2gears.c -es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la -- -2.0.0 +2.1.4 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 @@ -From 453353a221de9c64479f4372565d2cd8591b36cc Mon Sep 17 00:00:00 2001 -From: Frank Binns <frank.binns@imgtec.com> -Date: Fri, 29 Jun 2012 11:26:04 +0100 -Subject: [PATCH 5/9] Fix build when EGL_MESA_screen_surface extension isn't - present - -The EGL demos won't build against EGL implementations that don't support -the EGL_MESA_screen_surface extension. Fix this, in most cases, by -wrapping relevant bits of code in #ifdef EGL_MESA_screen_surface. - -Signed-off-by: Frank Binns <frank.binns@imgtec.com> - -Applied and fixed up in Yocto by... - -Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com> - -Upstream-Status: Pending ---- - src/egl/eglut/eglut.c | 9 +++++++-- - src/egl/eglut/eglut_screen.c | 14 ++++++++++++++ - src/egl/opengl/demo1.c | 2 ++ - src/egl/opengl/demo2.c | 7 ++++++- - src/egl/opengl/demo3.c | 7 ++++++- - 5 files changed, 35 insertions(+), 4 deletions(-) - -diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c -index 2ee6f15..f6a2ad4 100644 ---- a/src/egl/eglut/eglut.c -+++ b/src/egl/eglut/eglut.c -@@ -76,8 +76,9 @@ _eglutNow(void) - static void - _eglutDestroyWindow(struct eglut_window *win) - { -- if (_eglut->surface_type != EGL_PBUFFER_BIT && -- _eglut->surface_type != EGL_SCREEN_BIT_MESA) -+ -+ if (_eglut->surface_type == EGL_WINDOW_BIT || -+ _eglut->surface_type == EGL_PIXMAP_BIT) - eglDestroySurface(_eglut->dpy, win->surface); - - _eglutNativeFiniWindow(win); -@@ -175,7 +176,9 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h) - win->config, win->native.u.pixmap, NULL); - break; - case EGL_PBUFFER_BIT: -+#ifdef EGL_MESA_screen_surface - case EGL_SCREEN_BIT_MESA: -+#endif - win->surface = win->native.u.surface; - break; - default: -@@ -289,8 +292,10 @@ eglutDestroyWindow(int win) - if (window->index != win) - return; - -+#ifdef EGL_MESA_screen_surface - /* XXX it causes some bug in st/egl KMS backend */ - if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA) -+#endif - eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - - _eglutDestroyWindow(_eglut->current); -diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c -index 021a8f1..094a4e2 100644 ---- a/src/egl/eglut/eglut_screen.c -+++ b/src/egl/eglut/eglut_screen.c -@@ -35,26 +35,33 @@ - - #define MAX_MODES 100 - -+#ifdef EGL_MESA_screen_surface - static EGLScreenMESA kms_screen; - static EGLModeMESA kms_mode; - static EGLint kms_width, kms_height; -+#endif - - void - _eglutNativeInitDisplay(void) - { -+#ifdef EGL_MESA_screen_surface - _eglut->native_dpy = EGL_DEFAULT_DISPLAY; - _eglut->surface_type = EGL_SCREEN_BIT_MESA; -+#endif - } - - void - _eglutNativeFiniDisplay(void) - { -+#ifdef EGL_MESA_screen_surface - kms_screen = 0; - kms_mode = 0; - kms_width = 0; - kms_height = 0; -+#endif - } - -+#ifdef EGL_MESA_screen_surface - static void - init_kms(void) - { -@@ -94,19 +101,23 @@ init_kms(void) - kms_width = width; - kms_height = height; - } -+#endif - - void - _eglutNativeInitWindow(struct eglut_window *win, const char *title, - int x, int y, int w, int h) - { -+#ifdef EGL_MESA_screen_surface - EGLint surf_attribs[16]; - EGLint i; -+#endif - const char *exts; - - exts = eglQueryString(_eglut->dpy, EGL_EXTENSIONS); - if (!exts || !strstr(exts, "EGL_MESA_screen_surface")) - _eglutFatal("EGL_MESA_screen_surface is not supported\n"); - -+#ifdef EGL_MESA_screen_surface - init_kms(); - - i = 0; -@@ -128,14 +139,17 @@ _eglutNativeInitWindow(struct eglut_window *win, const char *title, - - win->native.width = kms_width; - win->native.height = kms_height; -+#endif - } - - void - _eglutNativeFiniWindow(struct eglut_window *win) - { -+#ifdef EGL_MESA_screen_surface - eglShowScreenSurfaceMESA(_eglut->dpy, - kms_screen, EGL_NO_SURFACE, 0); - eglDestroySurface(_eglut->dpy, win->native.u.surface); -+#endif - } - - void -diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c -index d892734..3a3564c 100644 ---- a/src/egl/opengl/demo1.c -+++ b/src/egl/opengl/demo1.c -@@ -18,6 +18,7 @@ - static void - TestScreens(EGLDisplay dpy) - { -+#ifdef EGL_MESA_screen_surface - #define MAX 8 - EGLScreenMESA screens[MAX]; - EGLint numScreens; -@@ -28,6 +29,7 @@ TestScreens(EGLDisplay dpy) - for (i = 0; i < numScreens; i++) { - printf(" Screen %d handle: %d\n", i, (int) screens[i]); - } -+#endif - } - - /** -diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c -index 505b474..bfef59e 100644 ---- a/src/egl/opengl/demo2.c -+++ b/src/egl/opengl/demo2.c -@@ -16,6 +16,7 @@ - - /*#define FRONTBUFFER*/ - -+#ifdef EGL_MESA_screen_surface - static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2, - GLfloat r, GLfloat g, GLfloat b) - { -@@ -95,12 +96,13 @@ TestScreens(EGLDisplay dpy) - printf(" Screen %d handle: %d\n", i, (int) screens[i]); - } - } -- -+#endif - - int - main(int argc, char *argv[]) - { - int maj, min; -+#ifdef EGL_MESA_screen_surface - EGLContext ctx; - EGLSurface pbuffer, screen_surf; - EGLConfig configs[10]; -@@ -115,6 +117,7 @@ main(int argc, char *argv[]) - EGLModeMESA mode; - EGLScreenMESA screen; - EGLint count; -+#endif - - EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY); - assert(d); -@@ -132,6 +135,7 @@ main(int argc, char *argv[]) - exit(1); - } - -+#ifdef EGL_MESA_screen_surface - eglGetConfigs(d, configs, 10, &numConfigs); - printf("Got %d EGL configs:\n", numConfigs); - for (i = 0; i < numConfigs; i++) { -@@ -211,6 +215,7 @@ main(int argc, char *argv[]) - eglDestroySurface(d, pbuffer); - eglDestroyContext(d, ctx); - eglTerminate(d); -+#endif - - return 0; - } -diff --git a/src/egl/opengl/demo3.c b/src/egl/opengl/demo3.c -index f84ca23..31b5d8b 100644 ---- a/src/egl/opengl/demo3.c -+++ b/src/egl/opengl/demo3.c -@@ -46,7 +46,7 @@ GLubyte OpenGL_bits[] = { - 0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00, - }; - -- -+#ifdef EGL_MESA_screen_surface - static void Init(void) - { - -@@ -551,11 +551,13 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height) - fclose(f); - } - } -+#endif - - int - main(int argc, char *argv[]) - { - int maj, min; -+#ifdef EGL_MESA_screen_surface - EGLContext ctx; - EGLSurface screen_surf; - EGLConfig configs[10]; -@@ -566,6 +568,7 @@ main(int argc, char *argv[]) - const GLubyte *bitmap; - EGLint screenAttribs[32]; - EGLint i; -+#endif - - EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY); - assert(d); -@@ -583,6 +586,7 @@ main(int argc, char *argv[]) - exit(1); - } - -+#ifdef EGL_MESA_screen_surface - eglGetConfigs(d, configs, 10, &numConfigs); - eglGetScreensMESA(d, &screen, 1, &count); - eglGetModesMESA(d, screen, &mode, 1, &count); -@@ -642,6 +646,7 @@ main(int argc, char *argv[]) - eglDestroySurface(d, screen_surf); - eglDestroyContext(d, ctx); - eglTerminate(d); -+#endif - - return 0; - } --- -2.0.0 - 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 @@ -From 6a19dba1d275579c73e7763b0554410ff4e1e650 Mon Sep 17 00:00:00 2001 -From: Frank Binns <frank.binns@imgtec.com> -Date: Fri, 29 Jun 2012 12:00:26 +0100 -Subject: [PATCH 6/9] Query display for EGL_MESA_screen_surface extension - before using it - -This code makes heavy use of the EGL_MESA_screen_surface extension so -check the display to determine if it's supported by the underlying EGL -implementation. If it doesn't then bail. - -Signed-off-by: Frank Binns <frank.binns@imgtec.com> - -Applied and fixed up in Yocto by... - -Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com> - -Upstream-Status: Pending ---- - src/egl/opengl/demo1.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c -index 3a3564c..06e2138 100644 ---- a/src/egl/opengl/demo1.c -+++ b/src/egl/opengl/demo1.c -@@ -110,6 +110,12 @@ main(int argc, char *argv[]) - printf("EGL version = %d.%d\n", maj, min); - printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR)); - -+ if (!strstr(eglQueryString(d, EGL_EXTENSIONS), -+ "EGL_MESA_screen_surface")) { -+ printf("EGL_MESA_screen_surface is not supported\n"); -+ exit(1); -+ } -+ - eglGetConfigs(d, NULL, 0, &numConfigs); - configs = malloc(sizeof(*configs) *numConfigs); - eglGetConfigs(d, configs, numConfigs, &numConfigs); --- -2.0.0 - 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 @@ -From d930b2da57f7c9efb80c8cef8f8adad15bbbc0d3 Mon Sep 17 00:00:00 2001 +From c59e286fa4e818ca015dd40e4725636309970ea8 Mon Sep 17 00:00:00 2001 From: Martin Jansa <Martin.Jansa@gmail.com> Date: Thu, 10 Jul 2014 14:30:52 +0200 -Subject: [PATCH 7/9] Install few more test programs +Subject: [PATCH] Install few more test programs Upstream-Status: Pending Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> --- src/egl/opengl/Makefile.am | 2 +- src/egl/opengles1/Makefile.am | 10 ++++------ @@ -13,7 +15,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am -index 0c7228f..87b2f1a 100644 +index fe7faa9..3e48141 100644 --- a/src/egl/opengl/Makefile.am +++ b/src/egl/opengl/Makefile.am @@ -50,7 +50,7 @@ endif @@ -22,42 +24,11 @@ index 0c7228f..87b2f1a 100644 if HAVE_EGL -noinst_PROGRAMS = \ +bin_PROGRAMS = \ - demo1 \ - demo2 \ - demo3 \ -diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am -index 3455e75..516e516 100644 ---- a/src/egl/opengles1/Makefile.am -+++ b/src/egl/opengles1/Makefile.am -@@ -36,11 +36,11 @@ AM_LDFLAGS = \ - $(EGL_LIBS) \ - -lm - --noinst_PROGRAMS = -+bin_PROGRAMS = - - if HAVE_EGL - if HAVE_GLESV1 --noinst_PROGRAMS += \ -+bin_PROGRAMS += \ - drawtex_screen \ - gears_screen \ - torus_screen \ -@@ -57,10 +57,8 @@ torus_screen_LDADD = ../eglut/libeglut_screen.la - tri_screen_LDADD = ../eglut/libeglut_screen.la - - if HAVE_X11 --noinst_PROGRAMS += \ -- clear -- --bin_PROGRAMS = \ -+bin_PROGRAMS += \ -+ clear \ - bindtex \ - drawtex_x11 \ - eglfbdev \ + eglinfo \ + peglgears \ + $(EGL_DRM_DEMOS) \ diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am -index 7318a43..b545225 100644 +index b0f1212..5fd1cf8 100644 --- a/src/egl/openvg/Makefile.am +++ b/src/egl/openvg/Makefile.am @@ -49,7 +49,7 @@ endif @@ -66,9 +37,9 @@ index 7318a43..b545225 100644 if HAVE_VG -noinst_PROGRAMS = \ +bin_PROGRAMS = \ - lion_screen \ - sp_screen \ $(EGL_X11_DEMOS) + endif + endif -- -2.0.0 +2.1.4 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 @@ -From 525fa9ded72d22b53c5eb366f61e2ac1d407a2db Mon Sep 17 00:00:00 2001 -From: Awais Belal <awais_belal@mentor.com> -Date: Thu, 8 Oct 2015 13:49:31 +0500 -Subject: [PATCH] sharedtex_mt: fix rendering thread hang - -XNextEvent is a blocking call which locks up the display mutex -this causes the rendering threads to hang when they try call -glXSwapBuffers() as that tries to take the same mutex in -underlying calls through XCopyArea(). -So we only go to XNextEvent when it has at least one event -and we wouldn't lock indefinitely. - -Signed-off-by: Awais Belal <awais_belal@mentor.com> -Upstream-Status: Backport (2b304e765695d385fd3bf414e6e444020bedb0a8) - ---- - src/xdemos/sharedtex_mt.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/xdemos/sharedtex_mt.c b/src/xdemos/sharedtex_mt.c -index a90903a..1d503c4 100644 ---- a/src/xdemos/sharedtex_mt.c -+++ b/src/xdemos/sharedtex_mt.c -@@ -420,9 +420,14 @@ Resize(struct window *h, unsigned int width, unsigned int height) - static void - EventLoop(void) - { -+ int i; -+ XEvent event; - while (1) { -- int i; -- XEvent event; -+ /* Do we have an event? */ -+ if (XPending(gDpy) == 0) { -+ usleep(10000); -+ continue; -+ } - XNextEvent(gDpy, &event); - for (i = 0; i < NumWindows; i++) { - struct window *h = &Windows[i]; --- -1.9.1 - 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 @@ -commit 74443c6ee79f3251f643ea05e94df58183e37d0d -Author: Matt Turner <mattst88@gmail.com> -Date: Fri Aug 28 15:57:38 2015 -0700 - - egl: Remove demos using EGL_MESA_screen_surface. - - The remnants of the extension were removed from Mesa in commit 7a58262e. - - Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com> - Tested-by: Andreas Boll <andreas.boll.dev@gmail.com> - Reviewed-by: Marek Olšák <marek.olsak@amd.com> - -Upstream-Status: Backport - -diff --git a/src/egl/eglut/Makefile.am b/src/egl/eglut/Makefile.am -index 2d2f2af..b765069 100644 ---- a/src/egl/eglut/Makefile.am -+++ b/src/egl/eglut/Makefile.am -@@ -33,17 +33,12 @@ if HAVE_WAYLAND - eglut_wayland = libeglut_wayland.la - endif - --noinst_LTLIBRARIES = libeglut_screen.la $(eglut_x11) $(eglut_wayland) -+noinst_LTLIBRARIES = $(eglut_x11) $(eglut_wayland) - endif - --libeglut_screen_la_SOURCES = \ -- eglut.c \ -- eglut.h \ -- eglutint.h \ -- eglut_screen.c -- - libeglut_x11_la_SOURCES = \ - eglut.c \ -+ eglut.h \ - eglutint.h \ - eglut_x11.c - libeglut_x11_la_CFLAGS = $(X11_CFLAGS) $(EGL_CFLAGS) -@@ -52,6 +47,7 @@ libeglut_x11_la_LIBADD = $(X11_LIBS) $(EGL_LIBS) - - libeglut_wayland_la_SOURCES = \ - eglut.c \ -+ eglut.h \ - eglutint.h \ - eglut_wayland.c - -diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c -index f6a2ad4..58b354a 100644 ---- a/src/egl/eglut/eglut.c -+++ b/src/egl/eglut/eglut.c -@@ -176,9 +176,6 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h) - win->config, win->native.u.pixmap, NULL); - break; - case EGL_PBUFFER_BIT: --#ifdef EGL_MESA_screen_surface -- case EGL_SCREEN_BIT_MESA: --#endif - win->surface = win->native.u.surface; - break; - default: -@@ -292,11 +289,7 @@ eglutDestroyWindow(int win) - if (window->index != win) - return; - --#ifdef EGL_MESA_screen_surface -- /* XXX it causes some bug in st/egl KMS backend */ -- if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA) --#endif -- eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); -+ eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - - _eglutDestroyWindow(_eglut->current); - } -diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c -deleted file mode 100644 -index 094a4e2..0000000 ---- a/src/egl/eglut/eglut_screen.c -+++ /dev/null -@@ -1,194 +0,0 @@ --/* -- * Copyright (C) 2010 LunarG Inc. -- * -- * Permission is hereby granted, free of charge, to any person obtaining a -- * copy of this software and associated documentation files (the "Software"), -- * to deal in the Software without restriction, including without limitation -- * the rights to use, copy, modify, merge, publish, distribute, sublicense, -- * and/or sell copies of the Software, and to permit persons to whom the -- * Software is furnished to do so, subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be included -- * in all copies or substantial portions of the Software. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -- * DEALINGS IN THE SOFTWARE. -- * -- * Authors: -- * Chia-I Wu <olv@lunarg.com> -- */ -- --#include <stdio.h> --#include <string.h> --#include <sys/time.h> -- --#define EGL_EGLEXT_PROTOTYPES --#include "EGL/egl.h" --#include "EGL/eglext.h" -- --#include "eglutint.h" -- --#define MAX_MODES 100 -- --#ifdef EGL_MESA_screen_surface --static EGLScreenMESA kms_screen; --static EGLModeMESA kms_mode; --static EGLint kms_width, kms_height; --#endif -- --void --_eglutNativeInitDisplay(void) --{ --#ifdef EGL_MESA_screen_surface -- _eglut->native_dpy = EGL_DEFAULT_DISPLAY; -- _eglut->surface_type = EGL_SCREEN_BIT_MESA; --#endif --} -- --void --_eglutNativeFiniDisplay(void) --{ --#ifdef EGL_MESA_screen_surface -- kms_screen = 0; -- kms_mode = 0; -- kms_width = 0; -- kms_height = 0; --#endif --} -- --#ifdef EGL_MESA_screen_surface --static void --init_kms(void) --{ -- EGLModeMESA modes[MAX_MODES]; -- EGLint num_screens, num_modes; -- EGLint width, height, best_mode; -- EGLint i; -- -- if (!eglGetScreensMESA(_eglut->dpy, &kms_screen, 1, &num_screens) || -- !num_screens) -- _eglutFatal("eglGetScreensMESA failed\n"); -- -- if (!eglGetModesMESA(_eglut->dpy, kms_screen, -- modes, MAX_MODES, &num_modes) || !num_modes) -- _eglutFatal("eglGetModesMESA failed!\n"); -- -- printf("Found %d modes:\n", num_modes); -- -- best_mode = 0; -- width = 0; -- height = 0; -- for (i = 0; i < num_modes; i++) { -- EGLint w, h; -- eglGetModeAttribMESA(_eglut->dpy, modes[i], EGL_WIDTH, &w); -- eglGetModeAttribMESA(_eglut->dpy, modes[i], EGL_HEIGHT, &h); -- printf("%3d: %d x %d\n", i, w, h); -- if (w > width && h > height) { -- width = w; -- height = h; -- best_mode = i; -- } -- } -- -- printf("Will use screen size: %d x %d\n", width, height); -- -- kms_mode = modes[best_mode]; -- kms_width = width; -- kms_height = height; --} --#endif -- --void --_eglutNativeInitWindow(struct eglut_window *win, const char *title, -- int x, int y, int w, int h) --{ --#ifdef EGL_MESA_screen_surface -- EGLint surf_attribs[16]; -- EGLint i; --#endif -- const char *exts; -- -- exts = eglQueryString(_eglut->dpy, EGL_EXTENSIONS); -- if (!exts || !strstr(exts, "EGL_MESA_screen_surface")) -- _eglutFatal("EGL_MESA_screen_surface is not supported\n"); -- --#ifdef EGL_MESA_screen_surface -- init_kms(); -- -- i = 0; -- surf_attribs[i++] = EGL_WIDTH; -- surf_attribs[i++] = kms_width; -- surf_attribs[i++] = EGL_HEIGHT; -- surf_attribs[i++] = kms_height; -- surf_attribs[i++] = EGL_NONE; -- -- /* create surface */ -- win->native.u.surface = eglCreateScreenSurfaceMESA(_eglut->dpy, -- win->config, surf_attribs); -- if (win->native.u.surface == EGL_NO_SURFACE) -- _eglutFatal("eglCreateScreenSurfaceMESA failed\n"); -- -- if (!eglShowScreenSurfaceMESA(_eglut->dpy, kms_screen, -- win->native.u.surface, kms_mode)) -- _eglutFatal("eglShowScreenSurfaceMESA failed\n"); -- -- win->native.width = kms_width; -- win->native.height = kms_height; --#endif --} -- --void --_eglutNativeFiniWindow(struct eglut_window *win) --{ --#ifdef EGL_MESA_screen_surface -- eglShowScreenSurfaceMESA(_eglut->dpy, -- kms_screen, EGL_NO_SURFACE, 0); -- eglDestroySurface(_eglut->dpy, win->native.u.surface); --#endif --} -- --void --_eglutNativeEventLoop(void) --{ -- int start = _eglutNow(); -- int frames = 0; -- -- _eglut->redisplay = 1; -- -- while (1) { -- struct eglut_window *win = _eglut->current; -- int now = _eglutNow(); -- -- if (now - start > 5000) { -- double elapsed = (double) (now - start) / 1000.0; -- -- printf("%d frames in %3.1f seconds = %6.3f FPS\n", -- frames, elapsed, frames / elapsed); -- fflush(stdout); -- -- start = now; -- frames = 0; -- -- /* send escape */ -- if (win->keyboard_cb) -- win->keyboard_cb(27); -- } -- -- if (_eglut->idle_cb) -- _eglut->idle_cb(); |
