diff options
author | Lauren Post <lauren.post@freescale.com> | 2015-07-24 10:40:49 -0500 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-04-19 15:03:16 -0300 |
commit | d86ab85c30725d80db8982bd73314be6fb9aed68 (patch) | |
tree | c532ed7a11963b33004d70a059b7b80b1078c83f /recipes-graphics | |
parent | e11b8465478964a1a3eb2fc8e35e07b1eefa9623 (diff) | |
download | meta-freescale-d86ab85c30725d80db8982bd73314be6fb9aed68.tar.gz |
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 <lauren.post@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics')
3 files changed, 135 insertions, 1 deletions
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 @@ | |||
1 | From 8aba54422d9a77383c150f9f70240b18b6e1918e Mon Sep 17 00:00:00 2001 | ||
2 | From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | ||
3 | Date: Thu, 9 Apr 2015 15:47:21 -0500 | ||
4 | Subject: [PATCH] Add OpenVG demos to support wayland. | ||
5 | |||
6 | Upstream Status: Pending | ||
7 | |||
8 | Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | ||
9 | --- | ||
10 | src/egl/Makefile.am | 6 +++--- | ||
11 | src/egl/openvg/Makefile.am | 33 +++++++++++++++++++++++++++++---- | ||
12 | 2 files changed, 32 insertions(+), 7 deletions(-) | ||
13 | |||
14 | diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am | ||
15 | index 4fe1ca8..65f4570 100644 | ||
16 | --- a/src/egl/Makefile.am | ||
17 | +++ b/src/egl/Makefile.am | ||
18 | @@ -26,10 +26,10 @@ SUBDIRS = \ | ||
19 | eglut \ | ||
20 | opengles1 \ | ||
21 | opengles2 \ | ||
22 | - oes_vg | ||
23 | + oes_vg \ | ||
24 | + openvg | ||
25 | |||
26 | if HAVE_GLU | ||
27 | SUBDIRS += \ | ||
28 | - opengl \ | ||
29 | - openvg | ||
30 | + opengl | ||
31 | endif | ||
32 | diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am | ||
33 | index b545225..a2e0d94 100644 | ||
34 | --- a/src/egl/openvg/Makefile.am | ||
35 | +++ b/src/egl/openvg/Makefile.am | ||
36 | @@ -46,31 +46,56 @@ EGL_X11_DEMOS += \ | ||
37 | text | ||
38 | endif | ||
39 | endif | ||
40 | +if HAVE_WAYLAND | ||
41 | +EGL_WL_DEMOS = \ | ||
42 | + lion_wayland \ | ||
43 | + sp_wayland | ||
44 | |||
45 | +if HAVE_FREETYPE2 | ||
46 | +EGL_WL_DEMOS += \ | ||
47 | + vgtext_wayland | ||
48 | +endif | ||
49 | +endif | ||
50 | if HAVE_EGL | ||
51 | if HAVE_VG | ||
52 | bin_PROGRAMS = \ | ||
53 | lion_screen \ | ||
54 | sp_screen \ | ||
55 | - $(EGL_X11_DEMOS) | ||
56 | + $(EGL_X11_DEMOS) \ | ||
57 | + $(EGL_WL_DEMOS) | ||
58 | endif | ||
59 | endif | ||
60 | |||
61 | lion_screen_SOURCES = lion.c lion-render.c lion-render.h | ||
62 | +lion_screen_LDADD = ../eglut/libeglut_screen.la | ||
63 | + | ||
64 | sp_screen_SOURCES = sp.c | ||
65 | +sp_screen_LDADD = ../eglut/libeglut_screen.la | ||
66 | |||
67 | +if HAVE_X11 | ||
68 | lion_x11_SOURCES = lion.c lion-render.c lion-render.h | ||
69 | sp_x11_SOURCES = sp.c | ||
70 | |||
71 | -lion_screen_LDADD = ../eglut/libeglut_screen.la | ||
72 | -sp_screen_LDADD = ../eglut/libeglut_screen.la | ||
73 | - | ||
74 | lion_x11_LDADD = ../eglut/libeglut_x11.la | ||
75 | sp_x11_LDADD = ../eglut/libeglut_x11.la | ||
76 | |||
77 | text_SOURCES = text.c | ||
78 | text_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@ | ||
79 | text_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_x11.la | ||
80 | +endif | ||
81 | + | ||
82 | +if HAVE_WAYLAND | ||
83 | +lion_wayland_SOURCES = lion.c lion-render.c lion-render.h | ||
84 | +lion_wayland_LDADD = ../eglut/libeglut_wayland.la | ||
85 | + | ||
86 | +sp_wayland_SOURCES = sp.c | ||
87 | +sp_wayland_LDADD = ../eglut/libeglut_wayland.la | ||
88 | + | ||
89 | +vgtext_wayland_SOURCES = text.c | ||
90 | +vgtext_wayland_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@ | ||
91 | +vgtext_wayland_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_wayland.la | ||
92 | + | ||
93 | +endif | ||
94 | |||
95 | SUBDIRS = \ | ||
96 | trivial | ||
97 | -- | ||
98 | 2.3.5 | ||
99 | |||
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 @@ | |||
1 | From 010af1952d935352764389636b7165283e6c9e3f Mon Sep 17 00:00:00 2001 | ||
2 | From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | ||
3 | Date: Tue, 7 Apr 2015 17:58:45 -0500 | ||
4 | Subject: [PATCH] Additional eglSwapBuffer calling makes wrong throttling | ||
5 | |||
6 | Upstream Status: Pending | ||
7 | |||
8 | Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | ||
9 | --- | ||
10 | src/egl/eglut/eglut_wayland.c | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/src/egl/eglut/eglut_wayland.c b/src/egl/eglut/eglut_wayland.c | ||
14 | index 968b33f..5664d35 100644 | ||
15 | --- a/src/egl/eglut/eglut_wayland.c | ||
16 | +++ b/src/egl/eglut/eglut_wayland.c | ||
17 | @@ -155,7 +155,7 @@ draw(void *data, struct wl_callback *callback, uint32_t time) | ||
18 | |||
19 | if (win->display_cb) | ||
20 | win->display_cb(); | ||
21 | - eglSwapBuffers(_eglut->dpy, win->surface); | ||
22 | + /*eglSwapBuffers(_eglut->dpy, win->surface);*/ | ||
23 | |||
24 | if (callback) | ||
25 | wl_callback_destroy(callback); | ||
26 | -- | ||
27 | 2.3.5 | ||
28 | |||
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 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
2 | 2 | ||
3 | MESA-DEMO-PATCH = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ | 3 | MESA-DEMO-PATCH = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ |
4 | file://fix-clear-build-break.patch" | 4 | file://fix-clear-build-break.patch \ |
5 | file://Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch \ | ||
6 | file://Add-OpenVG-demos-to-support-wayland.patch" | ||
5 | 7 | ||
6 | # only apply patches on mx6 that have a GPU | 8 | # only apply patches on mx6 that have a GPU |
7 | SRC_URI_append_mx6q = " ${MESA-DEMO-PATCH}" | 9 | SRC_URI_append_mx6q = " ${MESA-DEMO-PATCH}" |
@@ -17,3 +19,8 @@ PACKAGECONFIG_remove_mx6q = "${REMOVE_GLU}" | |||
17 | PACKAGECONFIG_remove_mx6dl = "${REMOVE_GLU}" | 19 | PACKAGECONFIG_remove_mx6dl = "${REMOVE_GLU}" |
18 | PACKAGECONFIG_remove_mx6sx = "${REMOVE_GLU}" | 20 | PACKAGECONFIG_remove_mx6sx = "${REMOVE_GLU}" |
19 | PACKAGECONFIG_remove_mx6sl = "gles1 gles2 ${REMOVE_GLU}" | 21 | PACKAGECONFIG_remove_mx6sl = "gles1 gles2 ${REMOVE_GLU}" |
22 | |||
23 | PACKAGECONFIG_append = "\ | ||
24 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \ | ||
25 | bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland vg', '', d), d)} \ | ||
26 | " | ||