From: Lauren Post Date: Fri, 24 Jul 2015 15:40:49 +0000 (-0500) Subject: mesa-demos: Add Wayland and OpenVG support X-Git-Tag: 2.1~375 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=d86ab85c30725d80db8982bd73314be6fb9aed68;p=meta-freescale.git mesa-demos: Add Wayland and OpenVG support Add patches to support both OpenVG and Wayland support. Add configuration to enable in PACKAGECONFIG. Signed-off-by: Lauren Post Signed-off-by: Otavio Salvador --- 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 index 00000000..726d67ba --- /dev/null +++ b/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch @@ -0,0 +1,99 @@ +From 8aba54422d9a77383c150f9f70240b18b6e1918e Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +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 +--- + 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 index 00000000..180a9d84 --- /dev/null +++ b/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch @@ -0,0 +1,28 @@ +From 010af1952d935352764389636b7165283e6c9e3f Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +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 +--- + 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 + diff --git a/recipes-graphics/mesa/mesa-demos_%.bbappend b/recipes-graphics/mesa/mesa-demos_%.bbappend index c8d1667a..cc245b22 100644 --- a/recipes-graphics/mesa/mesa-demos_%.bbappend +++ b/recipes-graphics/mesa/mesa-demos_%.bbappend @@ -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)} \ +"