- Add OpenVG demos - eglSwapBuffer calling makes wrong throttling Signed-off-by: Lauren Post <[email protected]> --- .../Add-OpenVG-demos-to-support-wayland.patch | 99 ++++++++++++++++++++ ...eglSwapBuffer-calling-makes-wrong-throttl.patch | 28 ++++++ recipes-graphics/mesa/mesa-demos_%.bbappend | 30 +++++- 3 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch create mode 100644 recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch
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 0000000..726d67b --- /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 <[email protected]> +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 <[email protected]> +--- + 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 0000000..180a9d8 --- /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 <[email protected]> +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 <[email protected]> +--- + 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 9f675a2..b380d90 100644 --- a/recipes-graphics/mesa/mesa-demos_%.bbappend +++ b/recipes-graphics/mesa/mesa-demos_%.bbappend @@ -1,6 +1,30 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append_mx6 = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ - file://fix-clear-build-break.patch" +MESA-DEMO-PATCH = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.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}" +SRC_URI_append_mx6dl = " ${MESA-DEMO-PATCH}" +SRC_URI_append_mx6sx = " ${MESA-DEMO-PATCH}" +SRC_URI_append_mx6sl = " ${MESA-DEMO-PATCH}" + +DEPENDS = "mesa" + +REMOVE_GLU = "${@base_contains('DISTRO_FEATURES', 'x11', '', \ + base_contains('DISTRO_FEATURES', 'wayland', 'glu', '', d), d)}" + +# only remove GLU on mx6 thave have a GPU +PACKAGECONFIG_remove_mx6q = "${REMOVE_GLU}" +PACKAGECONFIG_remove_mx6dl = "${REMOVE_GLU}" +PACKAGECONFIG_remove_mx6sx = "${REMOVE_GLU}" +PACKAGECONFIG_remove_mx6sl = "gles1 gles2 ${REMOVE_GLU}" + +PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg" + +PACKAGECONFIG_append = "${@base_contains('DISTRO_FEATURES', 'x11', '', \ + base_contains('DISTRO_FEATURES', 'wayland', 'wayland vg', '', d), d)}" + -PACKAGECONFIG_remove_mx6sl = "gles1 gles2" -- 1.7.9.5 -- _______________________________________________ meta-freescale mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-freescale
