Skip to contentSkip to conversation

package/efl: add OpenGL/OpenGLES support

PATCH New Romain Naour 3 participants 11 messages Sep 7, 2016 – Nov 20, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/efl: add OpenGL/OpenGLES support

Allow to enable graphic acceleration using OpenGL or OpenGLES with efl libraries.

The full OpenGL option depend on X11, because full OpenGL means GLX, which means X11. Also select efl xlib support when full OpenGL is selected.

Enable OpenGL ES when EGL API is enabled, otherwise the build fail with
this error:
configure: error: OpenGL ES requires EGL, please add --enable-egl to your configure options to switch to EGL + OpenGL ES.

With the upcomming Wayland support in EFL Buildroot packaging, OpenGL ES support is recommended.

---
v1: patch rework.
s/opengles/OpenGL ES/ as for Mesa3d package.
Add a dependency on EGL API for OpenGL ES support.
(from an old efl series)
http://lists.busybox.net/pipermail/buildroot/2015-December/146401.html
v8: Select efl xlib support with the full opengl support
is selected. (Yann E.Morin)
Ref: http://lists.busybox.net/pipermail/buildroot/2015-December/146646.html
v6: Rename OpenGL options (Yann E.Morin)
Only full OpenGL support depends on X11.

---
 package/efl/Config.in | 30 ++++++++++++++++++++++++++++++
 package/efl/efl.mk    | 19 ++++++++++++++++---
 2 files changed, 46 insertions(+), 3 deletions(-)
package/efl/Config.in +30 -0
index 1cc681c..f4d88bc 100644
@@ -155,6 +155,36 @@ config BR2_PACKAGE_EFL_X_XLIB
 	select BR2_PACKAGE_XLIB_LIBXTST
 	select BR2_PACKAGE_XPROTO_GLPROTO
 
+choice
+	bool "OpenGL support"
+	default BR2_PACKAGE_EFL_OPENGL   if BR2_PACKAGE_HAS_LIBGL && BR2_PACKAGE_XORG7
+	default BR2_PACKAGE_EFL_OPENGLES if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES
+	help
+	  libevas can be configured to use HW acceleration with OpenGL or
+	  OpenGL ES.
+
+config BR2_PACKAGE_EFL_OPENGL_NONE
+	bool "none"
+
+config BR2_PACKAGE_EFL_OPENGL
+	bool "OpenGL"
+	depends on BR2_PACKAGE_HAS_LIBGL
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_EFL_X_XLIB
+
+comment "OpenGL support needs X11 and an OpenGL provider"
+	depends on !BR2_PACKAGE_HAS_LIBGL || !BR2_PACKAGE_XORG7
+
+config BR2_PACKAGE_EFL_OPENGLES
+	bool "OpenGL ES (w/ EGL)"
+	depends on BR2_PACKAGE_HAS_LIBEGL
+	depends on BR2_PACKAGE_HAS_LIBGLES
+
+comment "OpenGL ES support needs an OpenGL ES w/ EGL provider"
+	depends on !BR2_PACKAGE_HAS_LIBGLES || !BR2_PACKAGE_HAS_LIBEGL
+
+endchoice # OpenGL support
+
 comment "libevas loaders"
 
 config BR2_PACKAGE_EFL_PNG
package/efl/efl.mk +16 -3
index 83588c1..44649d5 100644
@@ -28,7 +28,6 @@ EFL_DEPENDENCIES = host-pkgconf host-efl host-luajit dbus freetype \
 # --disable-sdl: disable sdl2 support.
 # --disable-spectre: disable spectre image loader.
 # --disable-xinput22: disable X11 XInput v2.2+ support.
-# --with-opengl=none: disable opengl support.
 # --with-doxygen: disable doxygen documentation
 EFL_CONF_OPTS = \
 	--with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \
@@ -43,8 +42,7 @@ EFL_CONF_OPTS = \
 	--disable-sdl \
 	--disable-spectre \
 	--disable-xinput22 \
-	--with-doxygen=no \
-	--with-opengl=none
+	--with-doxygen=no
 
 # Disable untested configuration warning.
 ifeq ($(BR2_PACKAGE_EFL_HAS_RECOMMENDED_CONFIG),)
@@ -182,6 +180,21 @@ else
 EFL_CONF_OPTS += --with-x11=none
 endif
 
+ifeq ($(BR2_PACKAGE_EFL_OPENGL),y)
+EFL_CONF_OPTS += --with-opengl=full
+EFL_DEPENDENCIES += libgl
+endif
+
+# OpenGL ES requires EGL
+ifeq ($(BR2_PACKAGE_EFL_OPENGLES),y)
+EFL_CONF_OPTS += --with-opengl=es --enable-egl
+EFL_DEPENDENCIES += libegl libgles
+endif
+
+ifeq ($(BR2_PACKAGE_EFL_OPENGL_NONE),y)
+EFL_CONF_OPTS += --with-opengl=none
+endif
+
 # Loaders that need external dependencies needs to be --enable-XXX=yes
 # otherwise the default is '=static'.
 # All other loaders are statically built-in
Signature · 1 line
2.5.5
#1 lore raw

PATCH 2/4 package/efl: enable elput support

---
 package/efl/Config.in | 9 +++++++++
 package/efl/efl.mk    | 5 +++++
 2 files changed, 14 insertions(+)
package/efl/Config.in +9 -0
index f4d88bc..df13047 100644
@@ -185,6 +185,15 @@ comment "OpenGL ES support needs an OpenGL ES w/ EGL provider"
 
 endchoice # OpenGL support
 
+config BR2_PACKAGE_EFL_ELPUT
+	bool "Elput"
+	select BR2_PACKAGE_LIBINPUT
+	help
+	  The elput library is an efl abstraction for the libinput library
+	  which can be used by various other subsystems (ecore_fb,
+	  ecore_drm, etc) to handle interfacing with libinput without
+	  having to duplicate the code in each subsystem.
+
 comment "libevas loaders"
 
 config BR2_PACKAGE_EFL_PNG
package/efl/efl.mk +5 -0
index 44649d5..5b65758 100644
@@ -152,6 +152,11 @@ else
 EFL_CONF_OPTS += --disable-wayland
 endif
 
+ifeq ($(BR2_PACKAGE_EFL_ELPUT),y)
+EFL_CONF_OPTS += --enable-elput
+EFL_DEPENDENCIES += libinput
+endif
+
 ifeq ($(BR2_PACKAGE_EFL_FB),y)
 EFL_CONF_OPTS += --enable-fb
 else
Signature · 1 line
2.5.5
#2 lore raw

PATCH 2/4 package/efl: enable elput support

Hello,

Quoted 11 lines · Romain Naour
---
 package/efl/Config.in | 9 +++++++++
 package/efl/efl.mk    | 5 +++++
 2 files changed, 14 insertions(+)
package/efl/Config.in +0 -0
index f4d88bc..df13047 100644

package/efl/Config.in comment "OpenGL ES support needs an OpenGL ES w/ EGL provider" · line 190

Quoted 6 lines
package/efl/Config.in +3 -0
@@ -185,6 +185,15 @@ comment "OpenGL ES support needs an OpenGL ES w/ EGL provider"
 
 endchoice # OpenGL support
 
+config BR2_PACKAGE_EFL_ELPUT
+	bool "Elput"
+	select BR2_PACKAGE_LIBINPUT

It also depends on BR2_PACKAGE_LIBXKBCOMMON (I've had a build failure).

Note that libxkbcommon was already selected by the efl package if wayland is used. But the elput functionality needs it unconditionally.

package/efl/Config.in comment "OpenGL ES support needs an OpenGL ES w/ EGL provider" · line 193

Quoted 3 lines
package/efl/Config.in +3 -0
+ifeq ($(BR2_PACKAGE_EFL_ELPUT),y)
+EFL_CONF_OPTS += --enable-elput
+EFL_DEPENDENCIES += libinput

I've added the libxkbcommon dependency here, and also an "else" clause to explicitly --disable-elput.

Applied with those changes. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#3 lore raw

PATCH 3/4 package/efl: enable libdrm support

In reply to Romain Naour

This support is required for Enlightenment wayland support [1] which will be added in a follow up patch.

As stated in configure.ac, libdrm support needs libdrm, elput, libxkbcommon and libgbm.

libgbm is only provided by mesa3d package when OpenGL EGL support is enabled, so add a direct dependency on mesa3d.

Rework the libxkbcommon dependency since it's now required for ecore-wayland and libdrm support.

[1] https://www.enlightenment.org/about-wayland

---
libgdm can be found as a standalone library on github [2] but it seems not very active. I prefer to rely on Mesa3d version.
[2] https://github.com/robclark/libgbm

---
 package/efl/Config.in | 14 ++++++++++++++
 package/efl/efl.mk    |  9 ++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
package/efl/Config.in +14 -0
index df13047..6171b29 100644
@@ -194,6 +194,20 @@ config BR2_PACKAGE_EFL_ELPUT
 	  ecore_drm, etc) to handle interfacing with libinput without
 	  having to duplicate the code in each subsystem.
 
+config BR2_PACKAGE_EFL_DRM
+	bool "Evas DRM Engine"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # require libgbm from mesa3d
+	depends on BR2_PACKAGE_EFL_ELPUT
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_LIBXKBCOMMON
+	help
+	  This option enable building support for the Evas DRM Engine.
+
+comment "Evas DRM Engine needs mesa3d w/ EGL support, threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_MESA3D_OPENGL_EGL
+	depends on BR2_PACKAGE_EFL_ELPUT
+
 comment "libevas loaders"
 
 config BR2_PACKAGE_EFL_PNG
package/efl/efl.mk +8 -1
index 5b65758..413cf58 100644
@@ -146,7 +146,7 @@ EFL_CONF_OPTS += --with-crypto=none
 endif # BR2_PACKAGE_OPENSSL
 
 ifeq ($(BR2_PACKAGE_WAYLAND),y)
-EFL_DEPENDENCIES += wayland libxkbcommon
+EFL_DEPENDENCIES += wayland
 EFL_CONF_OPTS += --enable-wayland
 else
 EFL_CONF_OPTS += --disable-wayland
@@ -200,6 +200,13 @@ ifeq ($(BR2_PACKAGE_EFL_OPENGL_NONE),y)
 EFL_CONF_OPTS += --with-opengl=none
 endif
 
+ifeq ($(BR2_PACKAGE_EFL_DRM),y)
+EFL_CONF_OPTS += --enable-drm
+EFL_DEPENDENCIES += libdrm libegl mesa3d
+endif
+
+EFL_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBXKBCOMMON),libxkbcommon)
+
 # Loaders that need external dependencies needs to be --enable-XXX=yes
 # otherwise the default is '=static'.
 # All other loaders are statically built-in
Signature · 1 line
2.5.5
#4 lore raw

PATCH 3/4 package/efl: enable libdrm support

Hello,

Quoted 8 lines · Romain Naour

This support is required for Enlightenment wayland support [1] which will be added in a follow up patch.

As stated in configure.ac, libdrm support needs libdrm, elput, libxkbcommon and libgbm.

libgbm is only provided by mesa3d package when OpenGL EGL support is enabled, so add a direct dependency on mesa3d.

So, on which platform have you tested that?

I'm still a bit uneasy with this libgbm stuff provided only by mesa3d. Does this means that other OpenGL ES implementations are not suitable?

Quoted 2 lines

Rework the libxkbcommon dependency since it's now required for ecore-wayland and libdrm support.

And elput (see earlier patch).

package/efl/Config.in config BR2_PACKAGE_EFL_ELPUT · line 201

Quoted 5 lines
package/efl/Config.in +5 -0
+config BR2_PACKAGE_EFL_DRM
+	bool "Evas DRM Engine"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # require libgbm from mesa3d
+	depends on BR2_PACKAGE_EFL_ELPUT

Why do you have a "depends on" for this rather than a "select" ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#5 lore raw

PATCH 3/4 package/efl: enable libdrm support

Hi Thomas,

Thanks for improving the two previous patches!

Le 17/09/2016 ? 19:11, Thomas Petazzoni a ?crit :

Quoted 6 lines

Hello,

Quoted 3 lines · Romain Naour

This support is required for Enlightenment wayland support [1] which will be added in a follow up patch.

Quoted 7 lines
Quoted 5 lines

As stated in configure.ac, libdrm support needs libdrm, elput, libxkbcommon and libgbm.

libgbm is only provided by mesa3d package when OpenGL EGL support is enabled, so add a direct dependency on mesa3d.

So, on which platform have you tested that?

Initially, I worked only with Qemu only but I set up an x86_64 atom target to test on real hardware.

Quoted 3 lines

I'm still a bit uneasy with this libgbm stuff provided only by mesa3d. Does this means that other OpenGL ES implementations are not suitable?

On the efl download page [1] they say "opengl (mesa or vendor supplied desktop OpenGL or OpenGL-ES2)", so mesa3d seems the only suitable implementation available in Buildroot.

[1] https://www.enlightenment.org/download

Quoted 6 lines
Quoted 3 lines

Rework the libxkbcommon dependency since it's now required for ecore-wayland and libdrm support.

And elput (see earlier patch).

Quoted 7 lines

package/efl/Config.in config BR2_PACKAGE_EFL_ELPUT · line 201

Quoted 5 lines
package/efl/Config.in +5 -0
+config BR2_PACKAGE_EFL_DRM
+	bool "Evas DRM Engine"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
+	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # require libgbm from mesa3d
+	depends on BR2_PACKAGE_EFL_ELPUT

Why do you have a "depends on" for this rather than a "select" ?

Yes, "select" should be used here.

Best regards,
Romain

Quoted 3 lines

Thomas

#6 lore raw

PATCH 4/4 package/efl: add Evas GL DRM Engine support

In reply to Romain Naour

This support is required for Enlightenment wayland support [1].

As stated in configure, Evas GL DRM Engine needs OpenGL ES with EGL and wayland (wayland-client >= 1.8.0)

[1] https://www.enlightenment.org/about-wayland

---
 package/efl/Config.in | 10 ++++++++++
 package/efl/efl.mk    |  6 ++++++
 2 files changed, 16 insertions(+)
package/efl/Config.in +10 -0
index 6171b29..c6c26d8 100644
@@ -208,6 +208,16 @@ comment "Evas DRM Engine needs mesa3d w/ EGL support, threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_MESA3D_OPENGL_EGL
 	depends on BR2_PACKAGE_EFL_ELPUT
 
+config BR2_PACKAGE_EFL_GL_DRM
+	bool "Evas GL DRM Engine"
+	depends on BR2_PACKAGE_EFL_DRM
+	depends on BR2_PACKAGE_EFL_OPENGLES # OpenGL ES with EGL support only
+	help
+	  This option enable building support for the Evas DRM Engine.
+
+comment "Evas GL DRM Engine needs Evas DRM Engine, OpenGL ES w/ EGL"
+	depends on BR2_PACKAGE_EFL_DRM && !BR2_PACKAGE_EFL_OPENGLES
+
 comment "libevas loaders"
 
 config BR2_PACKAGE_EFL_PNG
package/efl/efl.mk +6 -0
index 413cf58..e7d6f52 100644
@@ -205,6 +205,12 @@ EFL_CONF_OPTS += --enable-drm
 EFL_DEPENDENCIES += libdrm libegl mesa3d
 endif
 
+ifeq ($(BR2_PACKAGE_EFL_GL_DRM),y)
+EFL_CONF_OPTS += --enable-gl-drm
+else
+EFL_CONF_OPTS += --disable-gl-drm
+endif
+
 EFL_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBXKBCOMMON),libxkbcommon)
 
 # Loaders that need external dependencies needs to be --enable-XXX=yes
Signature · 1 line
2.5.5
#7 lore raw

PATCH 4/4 package/efl: add Evas GL DRM Engine support

Hello,

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 211

Quoted 9 lines · Romain Naour
package/efl/Config.in +1 -0
index 6171b29..c6c26d8 100644
@@ -208,6 +208,16 @@ comment "Evas DRM Engine needs mesa3d w/ EGL support, threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_MESA3D_OPENGL_EGL
 	depends on BR2_PACKAGE_EFL_ELPUT
 
+config BR2_PACKAGE_EFL_GL_DRM

Is it useful to have it as a separate option from BR2_PACKAGE_EFL_DRM ? In which case can BR2_PACKAGE_EFL_DRM without BR2_PACKAGE_EFL_GL_DRM be useful ?

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 214

Quoted 3 lines
package/efl/Config.in +3 -0
+	bool "Evas GL DRM Engine"
+	depends on BR2_PACKAGE_EFL_DRM
+	depends on BR2_PACKAGE_EFL_OPENGLES # OpenGL ES with EGL support only

So perhaps "BR2_PAKCAGE_EFL_GLES_DRM" is a better name? "GL" usually refers to "full OpenGL", as opposed to OpenGL ES.

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 216

Quoted 2 lines
package/efl/Config.in +2 -0
+	help
+	  This option enable building support for the Evas DRM Engine.

This help text is wrong, as it is just a copy/paste of the one of BR2_PACKAGE_EFL_DRM.

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 219

Quoted 3 lines
package/efl/Config.in +3 -0
+
+comment "Evas GL DRM Engine needs Evas DRM Engine, OpenGL ES w/ EGL"
+	depends on BR2_PACKAGE_EFL_DRM && !BR2_PACKAGE_EFL_OPENGLES

I find all those DRM/OpenGLES options in the efl package very confusing. Are all those options needed? What are the use cases for the different possible cases?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#8 lore raw

PATCH 4/4 package/efl: add Evas GL DRM Engine support

Hi Thomas,

Le 17/09/2016 ? 19:14, Thomas Petazzoni a ?crit :

Quoted 12 lines

Hello,

Quoted 8 lines · Romain Naour
package/efl/Config.in +0 -0
index 6171b29..c6c26d8 100644
@@ -208,6 +208,16 @@ comment "Evas DRM Engine needs mesa3d w/ EGL support, threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_MESA3D_OPENGL_EGL
 	depends on BR2_PACKAGE_EFL_ELPUT
 
Quoted 3 lines

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 211

Quoted 1 line
package/efl/Config.in +1 -0
+config BR2_PACKAGE_EFL_GL_DRM

Is it useful to have it as a separate option from BR2_PACKAGE_EFL_DRM ?

You mean enable evas gl-drm engine only when all dependencies are available without using a separate option? Yes why not.

Quoted 2 lines

In which case can BR2_PACKAGE_EFL_DRM without BR2_PACKAGE_EFL_GL_DRM be useful ?

I don't know. The evas gl-drm (opengl based DRM) engine can be enabled separately from ecore drm for some reason, so I tried to reproduce this possibility on the packaging.
Anyway my goal is the test EFL/E with Wayland and --enable-gl-drm and --enable-drm are required together for this [1].

[1] https://phab.enlightenment.org/w/wayland/

Quoted 7 lines

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 214

Quoted 4 lines
package/efl/Config.in +3 -0
+	bool "Evas GL DRM Engine"
+	depends on BR2_PACKAGE_EFL_DRM
+	depends on BR2_PACKAGE_EFL_OPENGLES # OpenGL ES with EGL support only

So perhaps "BR2_PAKCAGE_EFL_GLES_DRM" is a better name? "GL" usually refers to "full OpenGL", as opposed to OpenGL ES.

Ok, I'll fix this.

Quoted 6 lines

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 216

Quoted 3 lines
package/efl/Config.in +2 -0
+	help
+	  This option enable building support for the Evas DRM Engine.

This help text is wrong, as it is just a copy/paste of the one of BR2_PACKAGE_EFL_DRM.

Indeed, sorry...
The help text should precise that this support the Evas DRM based on OpenGL ES.

[2]
https://git.enlightenment.org/core/efl.git/commit/?id=f5b81093978fbbe411f9fb509617b6f4081f8da8

Quoted 8 lines

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 219

Quoted 4 lines
package/efl/Config.in +3 -0
+
+comment "Evas GL DRM Engine needs Evas DRM Engine, OpenGL ES w/ EGL"
+	depends on BR2_PACKAGE_EFL_DRM && !BR2_PACKAGE_EFL_OPENGLES

I find all those DRM/OpenGLES options in the efl package very confusing. Are all those options needed? What are the use cases for the different possible cases?

Well, the packaging is confusing because theses options are already confusing at configure.ac level. Do we want a fine grained options choices for theses or a "global" OpenGLES + DRM options?

Best regards,
Romain

Quoted 5 lines

Thanks,

Thomas

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw

PATCH 4/4 package/efl: add Evas GL DRM Engine support

Hello,

I try to reply to this mail :

http://lists.busybox.net/pipermail/buildroot/2016-September/172422.html

I am not sure I set my email header right..

Quoted 39 lines

-------- Message transf?r? --------
Sujet : Re: [Buildroot] [PATCH 4/4] package/efl: add Evas GL DRM Engine support Date : Sat, 17 Sep 2016 19:14:42 +0200
De : Thomas Petazzoni <[email protected]> Organisation : Free Electrons
Pour : Romain Naour <[email protected]>
Copie ? : buildroot at buildroot.org

Hello,

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 211

Quoted 9 lines · Romain Naour
package/efl/Config.in +1 -0
index 6171b29..c6c26d8 100644
@@ -208,6 +208,16 @@ comment "Evas DRM Engine needs mesa3d w/ EGL support, threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_MESA3D_OPENGL_EGL
 	depends on BR2_PACKAGE_EFL_ELPUT
 
+config BR2_PACKAGE_EFL_GL_DRM

Is it useful to have it as a separate option from BR2_PACKAGE_EFL_DRM ? In which case can BR2_PACKAGE_EFL_DRM without BR2_PACKAGE_EFL_GL_DRM be useful ?

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 214

Quoted 3 lines
package/efl/Config.in +3 -0
+	bool "Evas GL DRM Engine"
+	depends on BR2_PACKAGE_EFL_DRM
+	depends on BR2_PACKAGE_EFL_OPENGLES # OpenGL ES with EGL support only

So perhaps "BR2_PAKCAGE_EFL_GLES_DRM" is a better name? "GL" usually refers to "full OpenGL", as opposed to OpenGL ES.

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 216

Quoted 2 lines
package/efl/Config.in +2 -0
+	help
+	  This option enable building support for the Evas DRM Engine.

This help text is wrong, as it is just a copy/paste of the one of BR2_PACKAGE_EFL_DRM.

Quoted 7 lines

package/efl/Config.in comment "Evas DRM Engine needs mesa3d w/ EGL support, threads" · line 219

Quoted 3 lines
package/efl/Config.in +3 -0
+
+comment "Evas GL DRM Engine needs Evas DRM Engine, OpenGL ES w/ EGL"
+	depends on BR2_PACKAGE_EFL_DRM && !BR2_PACKAGE_EFL_OPENGLES

I find all those DRM/OpenGLES options in the efl package very confusing. Are all those options needed? What are the use cases for the different possible cases?

I am agree EFL and DRM are confusing. And it is not finished yet. They are doing an other DRM implementation 'DRM2'.

https://blogs.s-osg.org/introducing-new-improved-ecore_drm2-library/

But, you are asking for use case. So, here is mine :

I am doing a stand alone application on imx6. I am using EFL to run on top of DRM. Without X or wayland. My application is simple, I am not sure if the support of opengles is good for me or not.. as the boot time is important for me. Maybe loading opengl libs at start would slow down start up. I don't know..

I will resend the patch of Romain Naour, they are usefull for me.
http://patchwork.ozlabs.org/patch/671260
http://patchwork.ozlabs.org/patch/671261

Quoted 4 lines

Thanks,

Thomas

Cheers,

Pierre Floury

#11 lore raw

PATCH 1/4 package/efl: add OpenGL/OpenGLES support

In reply to Romain Naour

Hello,

package/efl/Config.in config BR2_PACKAGE_EFL_X_XLIB · line 161

Quoted 4 lines · Romain Naour
package/efl/Config.in +4 -0
+choice
+	bool "OpenGL support"
+	default BR2_PACKAGE_EFL_OPENGL   if BR2_PACKAGE_HAS_LIBGL && BR2_PACKAGE_XORG7
+	default BR2_PACKAGE_EFL_OPENGLES if BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES

Those defaults are not really needed, and they are not great as they duplicate the dependencies of the options.

Instead, I've moved the "none" choice at the end, and just relied on kconfig's behavior that consists in automatically selecting the first choice that has its dependencies met.

Quoted 4 lines
package/efl/efl.mk +4 -0
+ifeq ($(BR2_PACKAGE_EFL_OPENGL),y)
+EFL_CONF_OPTS += --with-opengl=full
+EFL_DEPENDENCIES += libgl
+endif

package/efl/efl.mk else · line 196

Quoted 10 lines
package/efl/efl.mk +10 -0
+
+# OpenGL ES requires EGL
+ifeq ($(BR2_PACKAGE_EFL_OPENGLES),y)
+EFL_CONF_OPTS += --with-opengl=es --enable-egl
+EFL_DEPENDENCIES += libegl libgles
+endif
+
+ifeq ($(BR2_PACKAGE_EFL_OPENGL_NONE),y)
+EFL_CONF_OPTS += --with-opengl=none
+endif

Since they are mutually exclusive, I've changed this by a:

ifeq ...
...
else ifeq ...
...
else ifeq ...
...
endif

block.

Applied with those changes. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com