]> code.ossystems Code Review - meta-freescale.git/commitdiff
mesa-demos: Add Wayland and OpenVG support
authorLauren Post <lauren.post@freescale.com>
Fri, 24 Jul 2015 15:40:49 +0000 (10:40 -0500)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 19 Apr 2016 18:03:16 +0000 (15:03 -0300)
Add patches to support both OpenVG and Wayland support.
Add configuration to enable in PACKAGECONFIG.

Signed-off-by: Lauren Post <lauren.post@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch [new file with mode: 0644]
recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch [new file with mode: 0644]
recipes-graphics/mesa/mesa-demos_%.bbappend

diff --git a/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch b/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch
new file mode 100644 (file)
index 0000000..726d67b
--- /dev/null
@@ -0,0 +1,99 @@
+From 8aba54422d9a77383c150f9f70240b18b6e1918e Mon Sep 17 00:00:00 2001
+From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
+Date: Thu, 9 Apr 2015 15:47:21 -0500
+Subject: [PATCH] Add OpenVG demos to support wayland.
+
+Upstream Status: Pending
+
+Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
+---
+ src/egl/Makefile.am        |  6 +++---
+ src/egl/openvg/Makefile.am | 33 +++++++++++++++++++++++++++++----
+ 2 files changed, 32 insertions(+), 7 deletions(-)
+
+diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
+index 4fe1ca8..65f4570 100644
+--- a/src/egl/Makefile.am
++++ b/src/egl/Makefile.am
+@@ -26,10 +26,10 @@ SUBDIRS = \
+       eglut \
+       opengles1 \
+       opengles2 \
+-      oes_vg
++      oes_vg \
++        openvg
+ if HAVE_GLU
+ SUBDIRS += \
+-      opengl \
+-      openvg
++      opengl
+ endif
+diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
+index b545225..a2e0d94 100644
+--- a/src/egl/openvg/Makefile.am
++++ b/src/egl/openvg/Makefile.am
+@@ -46,31 +46,56 @@ EGL_X11_DEMOS += \
+       text
+ endif
+ endif
++if HAVE_WAYLAND
++EGL_WL_DEMOS = \
++    lion_wayland \
++    sp_wayland
++if HAVE_FREETYPE2
++EGL_WL_DEMOS += \
++      vgtext_wayland 
++endif
++endif
+ if HAVE_EGL
+ if HAVE_VG
+ bin_PROGRAMS = \
+       lion_screen \
+       sp_screen \
+-      $(EGL_X11_DEMOS)
++      $(EGL_X11_DEMOS) \
++      $(EGL_WL_DEMOS)
+ endif
+ endif
+ lion_screen_SOURCES = lion.c lion-render.c lion-render.h
++lion_screen_LDADD = ../eglut/libeglut_screen.la
++
+ sp_screen_SOURCES = sp.c
++sp_screen_LDADD = ../eglut/libeglut_screen.la
++if HAVE_X11
+ lion_x11_SOURCES = lion.c lion-render.c lion-render.h
+ sp_x11_SOURCES = sp.c
+-lion_screen_LDADD = ../eglut/libeglut_screen.la
+-sp_screen_LDADD = ../eglut/libeglut_screen.la
+-
+ lion_x11_LDADD = ../eglut/libeglut_x11.la
+ sp_x11_LDADD = ../eglut/libeglut_x11.la
+ text_SOURCES = text.c
+ text_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@
+ text_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_x11.la
++endif
++
++if HAVE_WAYLAND
++lion_wayland_SOURCES = lion.c lion-render.c lion-render.h
++lion_wayland_LDADD = ../eglut/libeglut_wayland.la
++
++sp_wayland_SOURCES = sp.c
++sp_wayland_LDADD = ../eglut/libeglut_wayland.la
++
++vgtext_wayland_SOURCES = text.c
++vgtext_wayland_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@
++vgtext_wayland_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_wayland.la
++
++endif
+ SUBDIRS = \
+       trivial
+-- 
+2.3.5
+
diff --git a/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch b/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch
new file mode 100644 (file)
index 0000000..180a9d8
--- /dev/null
@@ -0,0 +1,28 @@
+From 010af1952d935352764389636b7165283e6c9e3f Mon Sep 17 00:00:00 2001
+From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
+Date: Tue, 7 Apr 2015 17:58:45 -0500
+Subject: [PATCH] Additional eglSwapBuffer calling makes wrong throttling
+
+Upstream Status: Pending
+
+Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
+---
+ src/egl/eglut/eglut_wayland.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/egl/eglut/eglut_wayland.c b/src/egl/eglut/eglut_wayland.c
+index 968b33f..5664d35 100644
+--- a/src/egl/eglut/eglut_wayland.c
++++ b/src/egl/eglut/eglut_wayland.c
+@@ -155,7 +155,7 @@ draw(void *data, struct wl_callback *callback, uint32_t time)
+    if (win->display_cb)
+       win->display_cb();
+-   eglSwapBuffers(_eglut->dpy, win->surface);
++   /*eglSwapBuffers(_eglut->dpy, win->surface);*/
+    if (callback)
+       wl_callback_destroy(callback);
+-- 
+2.3.5
+
index c8d1667a28e4d1106227249aa1a70199dcab0c37..cc245b22593518c41d75c844a74fd552a6b892be 100644 (file)
@@ -1,7 +1,9 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
 MESA-DEMO-PATCH = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \
-                    file://fix-clear-build-break.patch"
+                    file://fix-clear-build-break.patch \
+                    file://Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch \
+                    file://Add-OpenVG-demos-to-support-wayland.patch"
 
 # only apply patches on mx6 that have a GPU
 SRC_URI_append_mx6q  = " ${MESA-DEMO-PATCH}"
@@ -17,3 +19,8 @@ PACKAGECONFIG_remove_mx6q = "${REMOVE_GLU}"
 PACKAGECONFIG_remove_mx6dl = "${REMOVE_GLU}"
 PACKAGECONFIG_remove_mx6sx = "${REMOVE_GLU}"
 PACKAGECONFIG_remove_mx6sl = "gles1 gles2 ${REMOVE_GLU}"
+
+PACKAGECONFIG_append = "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
+       bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland vg', '', d), d)} \
+"