Skip to contentSkip to conversation

package/wlroots: change mesa3d dependency to virtual libegl/libgles

PATCH Superseded Gilles Talis 2 participants 6 messages Feb 7, 2021 – Feb 8, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/wlroots: change mesa3d dependency to virtual libegl/libgles

From: Julien Olivain <[email protected]>

Since commits:
https://github.com/swaywm/wlroots/commit/c2288a7b88240e4377bfc1c67b44efb58f704a42
https://github.com/swaywm/wlroots/commit/e18599b05e0f0cbeba11adbd489e801285470eab

Mesa dependency is no longer required. Wlroots is able to run on drivers that provide EGL and GLES2.0 support (with specific EGL wayland extensions)

This was verified on NXP's i.MX8MMini using imx-gpu-viv driver.

---
 package/wlroots/Config.in  | 13 +++++--------
 package/wlroots/wlroots.mk |  3 ++-
 2 files changed, 7 insertions(+), 9 deletions(-)
package/wlroots/Config.in +5 -8
index 2f72fd4945..0dbe57eaad 100644
@@ -1,6 +1,6 @@
-comment "wlroots needs udev, mesa3d w/ EGL and GLES support"
-	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || \
-		!BR2_PACKAGE_MESA3D_OPENGL_ES || \
+comment "wlroots needs udev, EGL and OpenGL ES support"
+	depends on !BR2_PACKAGE_HAS_LIBEGL || \
+		!BR2_PACKAGE_HAS_LIBGLES || \
 		!BR2_PACKAGE_HAS_UDEV
 
 comment "wlroots needs a toolchain w/ threads, dynamic library"
@@ -12,11 +12,8 @@ config BR2_PACKAGE_WLROOTS
 	depends on !BR2_STATIC_LIBS # wayland
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
 	depends on BR2_PACKAGE_HAS_UDEV # libinput
-	# Technically wlroots should work with any OpenGL implementation
-	# which provides EGL, GLES2, and libgbm; but in practice only
-	# Mesa ships an usable libgbm.
-	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL
-	depends on BR2_PACKAGE_MESA3D_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBEGL
+	depends on BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_LIBDRM
 	select BR2_PACKAGE_LIBINPUT
 	select BR2_PACKAGE_LIBXKBCOMMON
package/wlroots/wlroots.mk +2 -1
index 5665d5a956..0160b1aedb 100644
@@ -15,7 +15,8 @@ WLROOTS_DEPENDENCIES = \
 	host-wayland \
 	libinput \
 	libxkbcommon \
-	mesa3d \
+	libegl \
+	libgles \
 	pixman \
 	udev \
 	wayland \
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 package/cage: update dependencies to match wlroot's

From: Julien Olivain <[email protected]>

---
 package/cage/Config.in | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
package/cage/Config.in +5 -5
index 3bef08f037..4f823c768c 100644
@@ -1,6 +1,6 @@
-comment "cage needs udev, mesa3d w/ EGL and GLES support"
-	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || \
-		!BR2_PACKAGE_MESA3D_OPENGL_ES || \
+comment "cage needs udev, EGL and OpenGL ES support"
+	depends on !BR2_PACKAGE_HAS_LIBEGL || \
+		!BR2_PACKAGE_HAS_LIBGLES || \
 		!BR2_PACKAGE_HAS_UDEV
 
 comment "cage needs a toolchain w/ threads, dynamic library"
@@ -11,9 +11,9 @@ config BR2_PACKAGE_CAGE
 	bool "cage"
 	depends on !BR2_STATIC_LIBS # wlroots
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wlroots
+	depends on BR2_PACKAGE_HAS_LIBEGL # wlroots
+	depends on BR2_PACKAGE_HAS_LIBGLES # wlroots
 	depends on BR2_PACKAGE_HAS_UDEV # wlroots
-	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # wlroots
-	depends on BR2_PACKAGE_MESA3D_OPENGL_ES # wlroots
 	select BR2_PACKAGE_WLROOTS
 	help
 	  Kiosk compositor for Wayland, which displays a single
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 package/cage: update dependencies to match wlroot's

Gilles, All,

On 2021-02-07 11:51 +0100, Gilles Talis spake thusly:

Quoted 23 lines

From: Julien Olivain <[email protected]>

---
 package/cage/Config.in | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
package/cage/Config.in +3 -3
index 3bef08f037..4f823c768c 100644
@@ -1,6 +1,6 @@
-comment "cage needs udev, mesa3d w/ EGL and GLES support"
-	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || \
-		!BR2_PACKAGE_MESA3D_OPENGL_ES || \
+comment "cage needs udev, EGL and OpenGL ES support"
+	depends on !BR2_PACKAGE_HAS_LIBEGL || \
+		!BR2_PACKAGE_HAS_LIBGLES || \
 		!BR2_PACKAGE_HAS_UDEV
 
 comment "cage needs a toolchain w/ threads, dynamic library"

package/cage/Config.in config BR2_PACKAGE_CAGE · line 16

Quoted 8 lines
package/cage/Config.in +2 -2
@@ -11,9 +11,9 @@ config BR2_PACKAGE_CAGE
 	bool "cage"
 	depends on !BR2_STATIC_LIBS # wlroots
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wlroots
+	depends on BR2_PACKAGE_HAS_LIBEGL # wlroots
+	depends on BR2_PACKAGE_HAS_LIBGLES # wlroots
 	depends on BR2_PACKAGE_HAS_UDEV # wlroots
-	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # wlroots
-	depends on BR2_PACKAGE_MESA3D_OPENGL_ES # wlroots

Although indeed we try to keep changes to different packages in different patches, this one change really should be in the previous patch.

Indeed, it is a single semantic change: updating the dependencies of wlroots, and as a consequence, propagatign these new dependencies to the dependees of wlroots.

Otherwise:

- if we only apply patch 1, then the dependencies of cage would be

    incorrect and the comments misleading;

- if we apply both, and later find an issue and revert only the first, then the dependences of cage would also be incorrect and the comments misleading.

So, to me, these two patches should be squashed together.

Regards,
Yann E. MORIN.

Quoted 10 lines
package/cage/Config.in +0 -0
 	select BR2_PACKAGE_WLROOTS
 	help
 	  Kiosk compositor for Wayland, which displays a single
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 2/2 package/cage: update dependencies to match wlroot's

Hello Yann,

Le dim. 7 f?vr. 2021 ? 17:49, Yann E. MORIN <[email protected]> a ?crit :

Quoted 46 lines

Gilles, All,

On 2021-02-07 11:51 +0100, Gilles Talis spake thusly:

Quoted 23 lines

From: Julien Olivain <[email protected]>

---
 package/cage/Config.in | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
package/cage/Config.in +3 -3
index 3bef08f037..4f823c768c 100644
@@ -1,6 +1,6 @@
-comment "cage needs udev, mesa3d w/ EGL and GLES support"
-     depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || \
-             !BR2_PACKAGE_MESA3D_OPENGL_ES || \
+comment "cage needs udev, EGL and OpenGL ES support"
+     depends on !BR2_PACKAGE_HAS_LIBEGL || \
+             !BR2_PACKAGE_HAS_LIBGLES || \
              !BR2_PACKAGE_HAS_UDEV
 
 comment "cage needs a toolchain w/ threads, dynamic library"

package/cage/Config.in config BR2_PACKAGE_CAGE · line 16

Quoted 8 lines
package/cage/Config.in +2 -2
@@ -11,9 +11,9 @@ config BR2_PACKAGE_CAGE
      bool "cage"
      depends on !BR2_STATIC_LIBS # wlroots
      depends on BR2_TOOLCHAIN_HAS_THREADS # wlroots
+     depends on BR2_PACKAGE_HAS_LIBEGL # wlroots
+     depends on BR2_PACKAGE_HAS_LIBGLES # wlroots
      depends on BR2_PACKAGE_HAS_UDEV # wlroots
-     depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # wlroots
-     depends on BR2_PACKAGE_MESA3D_OPENGL_ES # wlroots

Although indeed we try to keep changes to different packages in different patches, this one change really should be in the previous patch.

Indeed, it is a single semantic change: updating the dependencies of wlroots, and as a consequence, propagatign these new dependencies to the dependees of wlroots.

Otherwise:

Quoted 8 lines

- if we only apply patch 1, then the dependencies of cage would be

    incorrect and the comments misleading;

- if we apply both, and later find an issue and revert only the first, then the dependences of cage would also be incorrect and the comments misleading.

So, to me, these two patches should be squashed together.

Your comment makes sense. I'll squash the patches in the v2.

Quoted 15 lines

Regards,
Yann E. MORIN.

Quoted 10 lines
package/cage/Config.in +0 -1
      select BR2_PACKAGE_WLROOTS
      help
        Kiosk compositor for Wayland, which displays a single
--

2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Quoted 7 lines

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

thanks for the review!
Gilles.

#4 lore raw

PATCH 1/2 package/wlroots: change mesa3d dependency to virtual libegl/libgles

In reply to Gilles Talis

Gilles, All,

On 2021-02-07 11:51 +0100, Gilles Talis spake thusly:

Quoted 8 lines

From: Julien Olivain <[email protected]>

Since commits:
https://github.com/swaywm/wlroots/commit/c2288a7b88240e4377bfc1c67b44efb58f704a42
https://github.com/swaywm/wlroots/commit/e18599b05e0f0cbeba11adbd489e801285470eab

Mesa dependency is no longer required. Wlroots is able to run on drivers that provide EGL and GLES2.0 support (with specific EGL wayland extensions)

HEre, you said "with specific EGL wayland extensions", so...

[--SNIP--]

package/wlroots/Config.in config BR2_PACKAGE_WLROOTS · line 15

Quoted 10 lines
package/wlroots/Config.in +1 -5
@@ -12,11 +12,8 @@ config BR2_PACKAGE_WLROOTS
 	depends on !BR2_STATIC_LIBS # wayland
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
 	depends on BR2_PACKAGE_HAS_UDEV # libinput
-	# Technically wlroots should work with any OpenGL implementation
-	# which provides EGL, GLES2, and libgbm; but in practice only
-	# Mesa ships an usable libgbm.
-	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL
-	depends on BR2_PACKAGE_MESA3D_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBEGL

... should not that be also depend on BR2_PACKAGE_HAS_LIBEGL_WAYLAND ?

Note that BR2_PACKAGE_HAS_LIBEGL_WAYLAND is a sub-option of BR2_PACKAGE_HAS_LIBEGL, so both should be added as dependency, but...

[--SNIP--]

package/wlroots/wlroots.mk WLROOTS_DEPENDENCIES = \ · line 18

Quoted 10 lines
package/wlroots/wlroots.mk +1 -1
index 5665d5a956..0160b1aedb 100644
@@ -15,7 +15,8 @@ WLROOTS_DEPENDENCIES = \
 	host-wayland \
 	libinput \
 	libxkbcommon \
-	mesa3d \
+	libegl \

... indeed only libegl needs to be added to _DEPENDENCIES.

Regards,
Yann E. MORIN.

Quoted 11 lines
package/wlroots/wlroots.mk +1 -0
+	libgles \
 	pixman \
 	udev \
 	wayland \
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/2 package/wlroots: change mesa3d dependency to virtual libegl/libgles

Hello Yann,

Le dim. 7 f?vr. 2021 ? 17:46, Yann E. MORIN <[email protected]> a ?crit :

Quoted 29 lines

Gilles, All,

On 2021-02-07 11:51 +0100, Gilles Talis spake thusly:

Quoted 8 lines

From: Julien Olivain <[email protected]>

Since commits:
https://github.com/swaywm/wlroots/commit/c2288a7b88240e4377bfc1c67b44efb58f704a42
https://github.com/swaywm/wlroots/commit/e18599b05e0f0cbeba11adbd489e801285470eab

Mesa dependency is no longer required. Wlroots is able to run on drivers that provide EGL and GLES2.0 support (with specific EGL wayland extensions)

HEre, you said "with specific EGL wayland extensions", so...

[--SNIP--]

package/wlroots/Config.in config BR2_PACKAGE_WLROOTS · line 15

Quoted 10 lines
package/wlroots/Config.in +1 -5
@@ -12,11 +12,8 @@ config BR2_PACKAGE_WLROOTS
      depends on !BR2_STATIC_LIBS # wayland
      depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm, wayland
      depends on BR2_PACKAGE_HAS_UDEV # libinput
-     # Technically wlroots should work with any OpenGL implementation
-     # which provides EGL, GLES2, and libgbm; but in practice only
-     # Mesa ships an usable libgbm.
-     depends on BR2_PACKAGE_MESA3D_OPENGL_EGL
-     depends on BR2_PACKAGE_MESA3D_OPENGL_ES
+     depends on BR2_PACKAGE_HAS_LIBEGL

... should not that be also depend on BR2_PACKAGE_HAS_LIBEGL_WAYLAND ?

Quoted 2 lines

Note that BR2_PACKAGE_HAS_LIBEGL_WAYLAND is a sub-option of BR2_PACKAGE_HAS_LIBEGL, so both should be added as dependency, but...

You're correct. Thanks for spotting that one.

Quoted 30 lines

[--SNIP--]

package/wlroots/wlroots.mk WLROOTS_DEPENDENCIES = \ · line 18

Quoted 10 lines
package/wlroots/wlroots.mk +1 -1
index 5665d5a956..0160b1aedb 100644
@@ -15,7 +15,8 @@ WLROOTS_DEPENDENCIES = \
      host-wayland \
      libinput \
      libxkbcommon \
-     mesa3d \
+     libegl \

... indeed only libegl needs to be added to _DEPENDENCIES.

Regards,
Yann E. MORIN.

Quoted 11 lines
package/wlroots/wlroots.mk +1 -1
+     libgles \
      pixman \
      udev \
      wayland \
--

2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Quoted 7 lines

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

thanks for the review. I'll prepare and send a v2. thanks
Gilles.