Skip to contentSkip to conversation

Add virtual package for full-openGL (branch yem/opengl)

PATCH New Yann E. MORIN 2 participants 19 messages Apr 17, 2014

lore
Share & tools
lore
#0 lore raw

v3 cover Add virtual package for full-openGL (branch yem/opengl)

From: "Yann E. MORIN" <[email protected]>

Hello All!

This series introduces a virtual package for full-openGL providers.

Changes v2 -> v3:
- libdrm does not depend on x86 (Thomas P.)
- do not make libdrm a hard-deps of xdriver_xf86-video-ati (Thomas P.)
- convert xapp-xdriinfo over to depend on libgl (Bernd)
- fix comment dependency in xdriver_xf86-video-intel
- some typoes fixed in some commit-logs

Changes v1 -> v2:
- almost complete rewrite after comments by Paul and Bernd

Regards,
Yann E. MORIN.

The following changes since commit 2b4b0ce9f2a51e8c1d3d467b7360668baa9a4ae8:

libsigsegv: not available on Microblaze (2014-04-16 20:59:14 +0200)

are available in the git repository at:

git://gitorious.org/buildroot/buildroot.git yem/opengl

for you to fetch changes up to fe9609b515ce099c8679a377896ea168b201bb39:

xapp_xdriinfo: depends on the virtual package libgl (2014-04-17 18:01:43 +0200)

----------------------------------------------------------------
Bernd Kuhls (1):
xapp_xdriinfo: depends on the virtual package libgl

Yann E. MORIN (13):
package/libdrm: radeon does not depend on x86 package/xdriver_xf86-video-ati: only select libdrm if the DRI driver is enabled package/x11-video-drivers: do not select, but depends on mesa3d package/mesa3d: re-arrange menu items
package/mesa3d: DRI drivers depend on X.org
package/mesa3d: add comment for when OpenGL EGL is not available package/mesa3d: simplify the code enabling full-OpenGL package/mesa3d: only enable full OpenGL when a DRI driver is enabled package/xorg-server: do not force-select xf86driproto for mesa3d package/libgl: introduce as a new virtual package for full-openGL providers package/mesa3d: with a DRI driver, is a full OpenGL provider package/libevas: switch dependency from mesa3d to _HAS_LIBGL package/vlc: depends on the virtual package libgl

 package/efl/libevas/Config.in                      |  2 +-
 package/libdrm/Config.in                           |  1 -
 package/mesa3d/Config.in                           | 33 +++++++++++++---------
 package/mesa3d/mesa3d.mk                           | 18 ++++++------
 package/opengl/Config.in                           |  1 +
 package/opengl/libgl/Config.in                     |  6 ++++
 package/opengl/libgl/libgl.mk                      |  7 +++++
 package/vlc/vlc.mk                                 |  4 +--
 package/x11r7/xapp_xdriinfo/Config.in              |  5 +++-
 package/x11r7/xdriver_xf86-video-ati/Config.in     |  9 ++++--
 package/x11r7/xdriver_xf86-video-glint/Config.in   |  5 +++-
 package/x11r7/xdriver_xf86-video-intel/Config.in   |  8 ++++--
 package/x11r7/xdriver_xf86-video-mach64/Config.in  |  3 ++
 package/x11r7/xdriver_xf86-video-mga/Config.in     |  5 +++-
 .../x11r7/xdriver_xf86-video-openchrome/Config.in  |  5 +++-
 package/x11r7/xdriver_xf86-video-r128/Config.in    |  5 +++-
 package/x11r7/xdriver_xf86-video-savage/Config.in  |  5 +++-
 package/x11r7/xdriver_xf86-video-sis/Config.in     |  5 +++-
 package/x11r7/xdriver_xf86-video-tdfx/Config.in    |  5 +++-
 package/x11r7/xdriver_xf86-video-vmware/Config.in  |  5 +++-
 package/x11r7/xserver_xorg-server/Config.in        |  1 -
 21 files changed, 96 insertions(+), 42 deletions(-)
 create mode 100644 package/opengl/libgl/Config.in
 create mode 100644 package/opengl/libgl/libgl.mk
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v3 1/14 package/libdrm: radeon does not depend on x86

From: "Yann E. MORIN" <[email protected]>

Thomas reported that the libdrm-radeon dependency on x86 (32- or 64-bit) dates back to the time where it also depended on libpciaccess.

Now that the libpciacess dependency has been dropped, Thomas managed to build a libdrm-radeon on something else than an x86 (an ARM for example).

Make libdrm-radeon no longer depend on x86

As a side effect, this fixes some potential "unmet direct dependencies" from the xdriver_xf86-video-ati package (which was the initial problem I was trying to solve.)

---
 package/libdrm/Config.in | 1 -
 1 file changed, 1 deletion(-)
package/libdrm/Config.in +0 -1
index 7192e94..72cf5f8 100644
@@ -22,7 +22,6 @@ config BR2_PACKAGE_LIBDRM_INTEL
 
 config BR2_PACKAGE_LIBDRM_RADEON
 	bool "radeon"
-	depends on BR2_i386 || BR2_x86_64
 	help
 	  install AMD/ATI graphics driver
 
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH v3 2/14 package/xdriver_xf86-video-ati: only select libdrm if the DRI driver is enabled

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

The xf86 radeon driver does not need libdrm, unless DRI is enabled too.

---
 package/x11r7/xdriver_xf86-video-ati/Config.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/x11r7/xdriver_xf86-video-ati/Config.in +2 -2
index 3c0cac3..d8bb029 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI
 	bool "xf86-video-ati"
-	select BR2_PACKAGE_LIBDRM
-	select BR2_PACKAGE_LIBDRM_RADEON
+	select BR2_PACKAGE_LIBDRM        if BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
+	select BR2_PACKAGE_LIBDRM_RADEON if BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
 	select BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_GLPROTO
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH v3 3/14 package/x11-video-drivers: do not select, but depends on mesa3d

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Currently, X.Org drivers that need mesa3d forcibly select it.

We'll soon switch mesa3d to being a provider of the full OpenGL virtual package, to come in a later patch.

It is bad practice to select a provider, as it can generate configuration inconsistencies.

So, switch all X.Org video driver that need mesa3d to actually depend on it, rather than forcibly select it.

To be noted: xf86-video-mach64 already used a 'depends on' rather than a 'select'.

At the same time, move the intel drivers dependencies to the top.

Cc Bernd Kuhls <[email protected]>
Cc Paul Cercueil <[email protected]>

---
Changes v2 -> v3:
- only show comment for intel driver when arch is an x86

---
 package/x11r7/xdriver_xf86-video-ati/Config.in        | 5 ++++-
 package/x11r7/xdriver_xf86-video-glint/Config.in      | 5 ++++-
 package/x11r7/xdriver_xf86-video-intel/Config.in      | 8 ++++++--
 package/x11r7/xdriver_xf86-video-mach64/Config.in     | 3 +++
 package/x11r7/xdriver_xf86-video-mga/Config.in        | 5 ++++-
 package/x11r7/xdriver_xf86-video-openchrome/Config.in | 5 ++++-
 package/x11r7/xdriver_xf86-video-r128/Config.in       | 5 ++++-
 package/x11r7/xdriver_xf86-video-savage/Config.in     | 5 ++++-
 package/x11r7/xdriver_xf86-video-sis/Config.in        | 5 ++++-
 package/x11r7/xdriver_xf86-video-tdfx/Config.in       | 5 ++++-
 package/x11r7/xdriver_xf86-video-vmware/Config.in     | 5 ++++-
 11 files changed, 45 insertions(+), 11 deletions(-)
package/x11r7/xdriver_xf86-video-ati/Config.in +4 -1
index d8bb029..a555fa3 100644
@@ -1,8 +1,8 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI
 	bool "xf86-video-ati"
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_LIBDRM        if BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
 	select BR2_PACKAGE_LIBDRM_RADEON if BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
-	select BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_GLPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
@@ -13,3 +13,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  ATI video driver
+
+comment "xf86-video-ati needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-glint/Config.in +4 -1
index bd92788..acae30b 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLINT
 	bool "xf86-video-glint"
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_LIBDRM
-	select BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_GLPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
@@ -13,3 +13,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLINT
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  GLINT/Permedia video driver
+
+comment "xf86-video-glint needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-intel/Config.in +6 -2
index 83b714a..69a9e78 100644
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL
 	bool "xf86-video-intel"
+	depends on (BR2_i386 || BR2_x86_64)
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_RENDERPROTO
@@ -7,7 +9,9 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL
 	select BR2_PACKAGE_XLIB_LIBPCIACCESS
 	select BR2_PACKAGE_LIBDRM
 	select BR2_PACKAGE_LIBDRM_INTEL
-	select BR2_PACKAGE_MESA3D
-	depends on (BR2_i386 || BR2_x86_64)
 	help
 	  Intel video driver
+
+comment "xf86-video-intel needs mesa3d"
+	depends on (BR2_i386 || BR2_x86_64)
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-mach64/Config.in +3 -0
index 674071c..42535e4 100644
@@ -9,3 +9,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MACH64
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  mach64 video driver
+
+comment "xf86-video-mach64 needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-mga/Config.in +4 -1
index 2fc3837..a504ec0 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MGA
 	bool "xf86-video-mga"
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_LIBDRM
-	select BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_GLPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
@@ -12,3 +12,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MGA
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  Matrox video driver
+
+comment "xf86-video-mga needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-openchrome/Config.in +4 -1
index 24b74bc..db27eef 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_OPENCHROME
 	bool "xf86-video-openchrome"
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_LIBDRM
-	select BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XLIB_LIBX11
 	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE
 	select BR2_PACKAGE_XLIB_LIBXVMC
@@ -14,3 +14,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_OPENCHROME
 	help
 	  Openchrome, A free and Open Source video driver for the VIA/S3G
 	  UniChrome and UniChrome Pro graphics chipsets.
+
+comment "xf86-video-openchrome needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-r128/Config.in +4 -1
index 07e3142..647156f 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_R128
 	bool "xf86-video-r128"
-	select BR2_PACKAGE_MESA3D
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_RENDERPROTO
@@ -8,3 +8,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_R128
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  R128 video driver
+
+comment "xf86-video-r128 needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-savage/Config.in +4 -1
index 93a731e..77dde87 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SAVAGE
 	bool "xf86-video-savage"
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_LIBDRM
-	select BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_RENDERPROTO
@@ -11,3 +11,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SAVAGE
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  S3 Savage video driver
+
+comment "xf86-video-savage needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-sis/Config.in +4 -1
index e184505..3c86bd4 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SIS
 	bool "xf86-video-sis"
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_LIBDRM
-	select BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_RENDERPROTO
@@ -13,3 +13,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SIS
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  SiS and XGI video driver
+
+comment "xf86-video-sis needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-tdfx/Config.in +4 -1
index 811eba2..96a69ba 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TDFX
 	bool "xf86-video-tdfx"
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_LIBDRM
-	select BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_RENDERPROTO
@@ -11,3 +11,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TDFX
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  3Dfx video driver
+
+comment "xf86-video-tdfx needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
package/x11r7/xdriver_xf86-video-vmware/Config.in +4 -1
index a4d2052..2e6b24d 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VMWARE
 	bool "xf86-video-vmware"
-	select BR2_PACKAGE_MESA3D
+	depends on BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
 	select BR2_PACKAGE_XPROTO_FONTSPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
@@ -10,3 +10,6 @@ config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VMWARE
 	select BR2_PACKAGE_XPROTO_XPROTO
 	help
 	  VMware SVGA video driver
+
+comment "xf86-video-vmware needs mesa3d"
+	depends on !BR2_PACKAGE_MESA3D
Signature · 1 line
1.8.3.2
#4 lore raw

PATCH v3 3/14 package/x11-video-drivers: do not select, but depends on mesa3d

Dear Yann E. MORIN,

Quoted 1 line · Yann E. MORIN

Currently, X.Org drivers that need mesa3d forcibly select it.

[...]

Quoted 4 lines
 package/x11r7/xdriver_xf86-video-ati/Config.in        | 5 ++++-
 package/x11r7/xdriver_xf86-video-glint/Config.in      | 5 ++++-
 package/x11r7/xdriver_xf86-video-intel/Config.in      | 8 ++++++--
 package/x11r7/xdriver_xf86-video-mach64/Config.in     | 3 +++
Quoted 8 lines
 package/x11r7/xdriver_xf86-video-mga/Config.in        | 5 ++++-
 package/x11r7/xdriver_xf86-video-openchrome/Config.in | 5 ++++-
 package/x11r7/xdriver_xf86-video-r128/Config.in       | 5 ++++-
 package/x11r7/xdriver_xf86-video-savage/Config.in     | 5 ++++-
 package/x11r7/xdriver_xf86-video-sis/Config.in        | 5 ++++-
 package/x11r7/xdriver_xf86-video-tdfx/Config.in       | 5 ++++-
 package/x11r7/xdriver_xf86-video-vmware/Config.in     | 5 ++++-
 11 files changed, 45 insertions(+), 11 deletions(-)

I know the dependency on mesa3d is not something added by your patch, but I'm wondering: do all these drivers actually *require* mesa3d ? Isn't it possible to build for example, the Intel X.org driver, for just 2D acceleration purposes? Or does even 2D acceleration relies on an OpenGL implementation being available, these days?

Thomas

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

PATCH v3 4/14 package/mesa3d: re-arrange menu items

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Make mesa3d a menuconfig, ie. a sub-menu on the boolean option.

Move drivers and additional API selections out of their own submenus, add a comment as separator.

This will make it easier to further re-arrange the config items in the following patches, to fix-enhance the packaging to handle the full-openGL provider stuff.

Cc Paul Cercueil <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/mesa3d/Config.in | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
package/mesa3d/Config.in +8 -7
index 81f2272..801a203 100644
@@ -1,4 +1,4 @@
-config BR2_PACKAGE_MESA3D
+menuconfig BR2_PACKAGE_MESA3D
 	bool "Mesa 3D Graphics Library"
 	select BR2_PACKAGE_LIBDRM
 	select BR2_PACKAGE_EXPAT
@@ -31,7 +31,7 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER
 config BR2_PACKAGE_MESA3D_DRIVER
 	bool
 
-menu "Drivers"
+comment "Gallium drivers"
 
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
 	bool "Gallium nouveau driver"
@@ -61,6 +61,8 @@ comment "DRI drivers needs a toolchain w/ dynamic library"
 
 if !BR2_PREFER_STATIC_LIB
 
+comment "DRI drivers"
+
 config BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
 	bool "DRI swrast driver"
 	select BR2_PACKAGE_MESA3D_DRI_DRIVER
@@ -87,10 +89,9 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
 
 endif # !BR2_PREFER_STATIC_LIB
 
-endmenu
+if BR2_PACKAGE_MESA3D_DRIVER
 
-menu "Additional API Support"
-depends on BR2_PACKAGE_MESA3D_DRIVER
+comment "Additional API Support"
 
 config BR2_PACKAGE_MESA3D_OPENGL_EGL
 	bool "EGL"
@@ -107,7 +108,7 @@ config BR2_PACKAGE_MESA3D_OPENGL_ES
 	  Use the Khronos OpenGL ES APIs.  This is commonly used on embedded
 	  systems and represents a subset of the OpenGL API.
 
-endmenu
+endif # BR2_PACKAGE_MESA3D_DRIVER
 
 config BR2_PACKAGE_PROVIDES_LIBEGL
 	default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_EGL
@@ -115,7 +116,7 @@ config BR2_PACKAGE_PROVIDES_LIBEGL
 config BR2_PACKAGE_PROVIDES_LIBGLES
 	default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_ES
 
-endif
+endif # BR2_PACKAGE_MESA3D
 
 comment "mesa3d needs a toolchain w/ C++, largefile"
 	depends on !BR2_LARGEFILE || !BR2_INSTALL_LIBSTDCPP
Signature · 1 line
1.8.3.2
#6 lore raw

PATCH v3 5/14 package/mesa3d: DRI drivers depend on X.org

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

It does not make sense to build DRI drivers without X.org.

Cc Paul Cercueil <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/mesa3d/Config.in | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
package/mesa3d/Config.in +4 -5
index 801a203..3a2766b 100644
@@ -56,10 +56,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
 	  This is a software opengl implementation using the Gallium3D
 	  infrastructure.
 
-comment "DRI drivers needs a toolchain w/ dynamic library"
-	depends on BR2_PREFER_STATIC_LIB
+comment "DRI drivers needs an X.Org server and a toolchain w/ dynamic library"
+	depends on BR2_PREFER_STATIC_LIB || !BR2_PACKAGE_XSERVER_XORG_SERVER
 
-if !BR2_PREFER_STATIC_LIB
+if !BR2_PREFER_STATIC_LIB && BR2_PACKAGE_XSERVER_XORG_SERVER
 
 comment "DRI drivers"
 
@@ -73,7 +73,6 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
 config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
 	bool "DRI i965 driver"
 	depends on BR2_i386 || BR2_x86_64
-	depends on BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_MESA3D_DRI_DRIVER
 	select BR2_PACKAGE_LIBDRM_INTEL
 	help
@@ -87,7 +86,7 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
 	help
 	  Legacy Radeon driver for R100 series GPUs.
 
-endif # !BR2_PREFER_STATIC_LIB
+endif # !BR2_PREFER_STATIC_LIB && BR2_PACKAGE_XSERVER_XORG_SERVER
 
 if BR2_PACKAGE_MESA3D_DRIVER
 
Signature · 1 line
1.8.3.2
#7 lore raw

PATCH v3 5/14 package/mesa3d: DRI drivers depend on X.org

Dear Yann E. MORIN,

Quoted 3 lines · Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

It does not make sense to build DRI drivers without X.org.

Indeed. Could you summarize which DRI drivers and which Gallium drivers are currently available in Mesa3D ? And also, how Gallium drivers are
used: can they be used with X.org ? Only with an EGL implementation ?

Thanks!

Thomas

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

PATCH v3 6/14 package/mesa3d: add comment for when OpenGL EGL is not available

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

OpenGL EGL needs udev support, so add a comment stating so.

Also, reword the OpenGL EGL prompt to be in the same format as the OpenGL ES prompt (and like the full OpenGL prompt that will shortly be added, too.)

Cc Paul Cercueil <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/mesa3d/Config.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/mesa3d/Config.in +4 -1
index 3a2766b..bd7a853 100644
@@ -92,8 +92,11 @@ if BR2_PACKAGE_MESA3D_DRIVER
 
 comment "Additional API Support"
 
+comment "OpenGL EGL needs udev /dev management"
+	depends on !BR2_PACKAGE_HAS_UDEV
+
 config BR2_PACKAGE_MESA3D_OPENGL_EGL
-	bool "EGL"
+	bool "OpenGL EGL"
 	depends on BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_HAS_LIBEGL
 	help
Signature · 1 line
1.8.3.2
#9 lore raw

PATCH v3 7/14 package/mesa3d: simplify the code enabling full-OpenGL

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Currently, full-OpenGL is enabled by checking that at least one driver is enabled. This is done by checking that the just-constructed lists of drivers are not empty.

But we already have a variable that is set to 'y' as soon as a driver is selected:

- DRI drivers select BR2_PACKAGE_MESA3D_DRI_DRIVER

- Gallium drivers select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER

- both BR2_PACKAGE_MESA3D_DRI_DRIVER and BR2_PACKAGE_MESA3D_GALLIUM_DRIVER select BR2_PACKAGE_MESA3D_DRIVER

So, BR2_PACKAGE_MESA3D_DRIVER is set to 'y' as soon as at least one driver is selected. We can use that variable rather than comparing the lists of drivers.

Also, rearrange the code in a more logical way, by moving the code that enables OpenGL nearer to the code enabling EGL and GLES.

Cc Paul Cercueil <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/mesa3d/mesa3d.mk | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
package/mesa3d/mesa3d.mk +8 -10
index 1e2cc53..0d41efa 100644
@@ -58,16 +58,6 @@ MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast
 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965)   += i965
 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon
 
-# at least one API is required, for buildroot enable OpenGL API by default
-# other APIs (EGL, EGL_ES) are optional
-ifeq ($(MESA3D_GALLIUM_DRIVERS-y)$(MESA3D_DRI_DRIVERS-y),)
-MESA3D_CONF_OPT += \
-	--disable-opengl
-else
-MESA3D_CONF_OPT += \
-	--enable-opengl
-endif
-
 ifeq ($(MESA3D_GALLIUM_DRIVERS-y),)
 MESA3D_CONF_OPT += \
 	--without-gallium-drivers
@@ -90,6 +80,14 @@ endif
 
 # APIs
 
+# At least one API is required, for buildroot enable OpenGL API by default.
+# Other APIs (EGL, EGL_ES) are optional
+ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y)
+MESA3D_CONF_OPT += --enable-opengl
+else
+MESA3D_CONF_OPT += --disable-opengl
+endif
+
 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
 # egl depends on gbm, gbm depends on udev
 MESA3D_DEPENDENCIES += udev
Signature · 1 line
1.8.3.2
#10 lore raw

PATCH v3 8/14 package/mesa3d: only enable full OpenGL when a DRI driver is enabled

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Full OpenGL is only provided when:
- a DRI driver is enabled,
- and X.Org is enabled

Since DRI driver depend on X.Org being selected, this means that we can (have to) enable full OpenGL as soon as a DRI driver is enabled.

On the other hand, Gallium drivers, which currently do enable full OpenGL, only really provide OpenGL EGL and GLES, not full OpenGL.

So we exclude Gallium drivers when checking whether to enable full OpenGL in mesa3d.

Cc Paul Cercueil <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/mesa3d/mesa3d.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/mesa3d/mesa3d.mk +3 -3
index 0d41efa..db166f8 100644
@@ -80,9 +80,9 @@ endif
 
 # APIs
 
-# At least one API is required, for buildroot enable OpenGL API by default.
-# Other APIs (EGL, EGL_ES) are optional
-ifeq ($(BR2_PACKAGE_MESA3D_DRIVER),y)
+# Full OpenGL is provided by DRI drivers with X.Org; DRI drivers are only
+# enabled when X.Org is enabled anyway, so no need to check for X.Org here.
+ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
 MESA3D_CONF_OPT += --enable-opengl
 else
 MESA3D_CONF_OPT += --disable-opengl
Signature · 1 line
1.8.3.2
#11 lore raw

PATCH v3 9/14 package/xorg-server: do not force-select xf86driproto for mesa3d

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

This is already handled by mesa3d itself.

Cc Paul Cercueil <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 package/x11r7/xserver_xorg-server/Config.in | 1 -
 1 file changed, 1 deletion(-)
package/x11r7/xserver_xorg-server/Config.in +0 -1
index dfa7d10..e191dce 100644
@@ -45,7 +45,6 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER
 	select BR2_PACKAGE_XPROTO_XEXTPROTO
 	select BR2_PACKAGE_XPROTO_XF86BIGFONTPROTO
 	select BR2_PACKAGE_XPROTO_XF86DGAPROTO
-	select BR2_PACKAGE_XPROTO_XF86DRIPROTO if BR2_PACKAGE_MESA3D
 	select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO
 	select BR2_PACKAGE_XPROTO_XPROTO
 	select BR2_PACKAGE_XUTIL_UTIL_MACROS
Signature · 1 line
1.8.3.2
#12 lore raw

PATCH v3 10/14 package/libgl: introduce as a new virtual package for full-openGL providers

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Currently, only mesa3d is such a full-openGL provider.

But it is easy to see a few more cropping up at the door:
- NVidia's binary blob
- ATI's fglrx binary blob

Having this virtual full-openGL package will help when those are getting in.

Cc Bernd Kuhls <[email protected]>
Cc Paul Cercueil <[email protected]>
---
 package/opengl/Config.in       | 1 +
 package/opengl/libgl/Config.in | 6 ++++++
 package/opengl/libgl/libgl.mk  | 7 +++++++
 3 files changed, 14 insertions(+)
 create mode 100644 package/opengl/libgl/Config.in
 create mode 100644 package/opengl/libgl/libgl.mk
package/opengl/Config.in +1 -0
index ed81835..20ee28b 100644
@@ -1,3 +1,4 @@
+source "package/opengl/libgl/Config.in"
 source "package/opengl/libegl/Config.in"
 source "package/opengl/libgles/Config.in"
 source "package/opengl/libopenvg/Config.in"
package/opengl/libgl/Config.in new file +6 -0
new file mode 100644
index 0000000..8b99e5b
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HAS_LIBGL
+	bool
+
+config BR2_PACKAGE_PROVIDES_LIBGL
+	depends on BR2_PACKAGE_HAS_LIBGL
+	string
package/opengl/libgl/libgl.mk new file +7 -0
new file mode 100644
index 0000000..7abc13d
@@ -0,0 +1,7 @@
+################################################################################
+#
+# libgl
+#
+################################################################################
+
+$(eval $(virtual-package))
Signature · 1 line
1.8.3.2
#13 lore raw

PATCH v3 11/14 package/mesa3d: with a DRI driver, is a full OpenGL provider

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Make mesa3d a provider for full OpenGL, as soon as a DRI driver is enabled.

Full OpenGL is only possible when:
- a DRI driver is enabled,
- and X.Org is enabled

Since DRI driver in fact depend on X.Org being enabled in the first place, we can safely declare mesa3d as a full openGL provider as soon as at least one DRI driver is enabled.

Cc Bernd Kuhls <[email protected]>
Cc Paul Cercueil <[email protected]>
---
 package/mesa3d/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/mesa3d/Config.in +4 -0
index bd7a853..0793b48 100644
@@ -26,8 +26,12 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
 
 config BR2_PACKAGE_MESA3D_DRI_DRIVER
 	select BR2_PACKAGE_MESA3D_DRIVER
+	select BR2_PACKAGE_HAS_LIBGL
 	bool
 
+config BR2_PACKAGE_PROVIDES_LIBGL
+	default "mesa3d" if BR2_PACKAGE_MESA3D_DRI_DRIVER
+
 config BR2_PACKAGE_MESA3D_DRIVER
 	bool
 
Signature · 1 line
1.8.3.2
#14 lore raw

PATCH v3 11/14 package/mesa3d: with a DRI driver, is a full OpenGL provider

Dear Yann E. MORIN,

package/mesa3d/Config.in config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER · line 33

Quoted 7 lines · Yann E. MORIN

config BR2_PACKAGE_MESA3D_DRI_DRIVER

package/mesa3d/Config.in +3 -0
 	select BR2_PACKAGE_MESA3D_DRIVER
+	select BR2_PACKAGE_HAS_LIBGL
 	bool
 
+config BR2_PACKAGE_PROVIDES_LIBGL
+	default "mesa3d" if BR2_PACKAGE_MESA3D_DRI_DRIVER

I find this a little bit confusing. Wouldn't it make more sense to have a BR2_PACKAGE_MESA3D_GL option, that gets automatically defined when mesa3d provides a full OpenGL implementation? I know it appears to technically be the same as Mesa3D having a DRI driver, but it would look more logical.

In fact, the Mesa3D situation is so complex that a good fat comment on top of its Config.in file may be useful to have :)

Thomas

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

PATCH v3 12/14 package/libevas: switch dependency from mesa3d to _HAS_LIBGL

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

We now have a virtual package that represents availability of full OpenGL.

This should be the end of this dependency hell epic, now. :-)

Cc Bernd Kuhls <[email protected]>
Cc Paul Cercueil <[email protected]>
---
 package/efl/libevas/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/efl/libevas/Config.in +1 -1
index 8eea23d..febc115 100644
@@ -148,7 +148,7 @@ choice
 
 config BR2_PACKAGE_LIBEVAS_GL
 	bool "generic OpenGL"
-	depends on BR2_PACKAGE_MESA3D
+	depends on BR2_PACKAGE_HAS_LIBGL
 	select BR2_PACKAGE_LIBEET
 
 config BR2_PACKAGE_LIBEVAS_GLES_SGX
Signature · 1 line
1.8.3.2
#16 lore raw

PATCH v3 13/14 package/vlc: depends on the virtual package libgl

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

Currently, vlc depends on mesa3d to provide the openGL support.

We now have a virtual package, libgl, which ensures openGL is available.

This is support for full OpenGL, which is only available when X.Org is enabled, which is anyway a dependency of full OpenGL.

Cc Bernd Kuhls <[email protected]>
Cc Paul Cercueil <[email protected]>
---
 package/vlc/vlc.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/vlc/vlc.mk +2 -2
index bcb592c..e14c9c3 100644
@@ -118,9 +118,9 @@ else
 VLC_CONF_OPT += --disable-flac
 endif
 
-ifeq ($(BR2_PACKAGE_MESA3D),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
 VLC_CONF_OPT += --enable-glx
-VLC_DEPENDENCIES += mesa3d
+VLC_DEPENDENCIES += libgl
 else
 VLC_CONF_OPT += --disable-glx
 endif
Signature · 1 line
1.8.3.2
#17 lore raw

PATCH v3 14/14 xapp_xdriinfo: depends on the virtual package libgl

In reply to Yann E. MORIN

From: Bernd Kuhls <[email protected]>

Fixes http://autobuild.buildroot.net/results/90a/90a8226a8a2978eb13d02645cb9e3d95d9b95757/

[yann.morin.1998 at free.fr: fix comment, trim the commit log from unneeded info]
---
 package/x11r7/xapp_xdriinfo/Config.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
package/x11r7/xapp_xdriinfo/Config.in +4 -1
index 970bff5..36dc577 100644
@@ -2,6 +2,9 @@ config BR2_PACKAGE_XAPP_XDRIINFO
 	bool "xdriinfo"
 	select BR2_PACKAGE_XLIB_LIBX11
 	select BR2_PACKAGE_XPROTO_GLPROTO
-	depends on BR2_PACKAGE_MESA3D
+	depends on BR2_PACKAGE_HAS_LIBGL
 	help
 	  query configuration information of DRI drivers
+
+comment "xdriinfo needs an OpenGL backend"
+	depends on !BR2_PACKAGE_HAS_LIBGL
Signature · 1 line
1.8.3.2
#18 lore raw

v3 cover Add virtual package for full-openGL (branch yem/opengl)

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 6 lines · Yann E. MORIN

Yann E. MORIN (13):
package/libdrm: radeon does not depend on x86 package/xdriver_xf86-video-ati: only select libdrm if the DRI driver is enabled package/x11-video-drivers: do not select, but depends on mesa3d package/mesa3d: re-arrange menu items
package/mesa3d: DRI drivers depend on X.org

Quoted 8 lines

package/mesa3d: add comment for when OpenGL EGL is not available package/mesa3d: simplify the code enabling full-OpenGL package/mesa3d: only enable full OpenGL when a DRI driver is enabled package/xorg-server: do not force-select xf86driproto for mesa3d package/libgl: introduce as a new virtual package for full-openGL providers package/mesa3d: with a DRI driver, is a full OpenGL provider package/libevas: switch dependency from mesa3d to _HAS_LIBGL package/vlc: depends on the virtual package libgl

Series applied, thanks. I'll make a few comments on some of the patches, as there might be some additional followup patches needed.

Thomas

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