Skip to contentSkip to conversation

package/mesa3d: allow selecting GLX platform

PATCH New James Hilliard 2 participants 2 messages Feb 12, 2020 – Feb 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/mesa3d: allow selecting GLX platform

---
 package/mesa3d/Config.in | 36 ++++++++++++++++++++++++++++++++++++
 package/mesa3d/mesa3d.mk |  6 ++++++
 2 files changed, 42 insertions(+)
package/mesa3d/Config.in +36 -0
index dbfc59bad5..b8b8451bbd 100644
@@ -414,8 +414,40 @@ config BR2_PACKAGE_MESA3D_OPENGL_GLX
 comment "OpenGL GLX support needs X11"
 	depends on !BR2_PACKAGE_XORG7
 
+if BR2_PACKAGE_MESA3D_OPENGL_GLX
+
+choice
+	prompt "GLX platform"
+
+config BR2_PACKAGE_MESA3D_OPENGL_GLX_DRI
+	bool "dri"
+
+config BR2_PACKAGE_MESA3D_OPENGL_GLX_XLIB
+	bool "xlib"
+	depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER
+
+comment "xlib conflicts with any mesa3d dri drivers"
+	depends on BR2_PACKAGE_MESA3D_DRI_DRIVER
+
+config BR2_PACKAGE_MESA3D_OPENGL_GLX_GALLIUM_XLIB
+	bool "gallium-xlib"
+	depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER
+	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
+
+comment "gallium-xlib conflicts with any mesa3d dri drivers and requires gallium w/ swrast"
+	depends on BR2_PACKAGE_MESA3D_DRI_DRIVER || \
+		!BR2_PACKAGE_MESA3D_GALLIUM_DRIVER || \
+		!BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
+
+endchoice
+
+endif
+
 config BR2_PACKAGE_MESA3D_OPENGL_EGL
 	bool "OpenGL EGL"
+	depends on !BR2_PACKAGE_MESA3D_OPENGL_GLX || \
+		BR2_PACKAGE_MESA3D_OPENGL_GLX_DRI
 	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
 	select BR2_PACKAGE_MESA3D_GBM
@@ -423,6 +455,10 @@ config BR2_PACKAGE_MESA3D_OPENGL_EGL
 	  Use the Khronos EGL APIs. EGL is a window manager for OpenGL
 	  applications similar to GLX, for X, and WGL, for Windows.
 
+comment "OpenGL EGL is incompatible w/ non-dri GLX platforms"
+	depends on BR2_PACKAGE_MESA3D_OPENGL_GLX
+	depends on !BR2_PACKAGE_MESA3D_OPENGL_GLX_DRI
+
 config BR2_PACKAGE_MESA3D_OPENGL_ES
 	bool "OpenGL ES"
 	select BR2_PACKAGE_HAS_LIBGLES
package/mesa3d/mesa3d.mk +6 -0
index c14716bf15..a853454e05 100644
@@ -57,7 +57,13 @@ ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
 #  dri          : dri based GLX requires at least one DRI driver || dri based GLX requires shared-glapi
 #  xlib         : xlib conflicts with any dri driver
 #  gallium-xlib : Gallium-xlib based GLX requires at least one gallium driver || Gallium-xlib based GLX requires softpipe or llvmpipe || gallium-xlib conflicts with any dri driver.
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX_DRI),y)
 MESA3D_CONF_OPTS += -Dglx=dri
+else ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX_XLIB),y)
+MESA3D_CONF_OPTS += -Dglx=xlib
+else ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX_GALLIUM_XLIB),y)
+MESA3D_CONF_OPTS += -Dglx=gallium-xlib
+endif
 ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
 MESA3D_CONF_OPTS += -Dgallium-xa=true
 else
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/mesa3d: allow selecting GLX platform

James, All,

On 2020-02-12 15:16 -0700, James Hilliard spake thusly:

Quoted 1 line

Sorry, but this commit needs a bit more explanations.

Besides, we've recently applied some fixes that change the dependency chains of EGL vs. GBM vs. DRI.

So, can you rebase your change on-top of master, check everything is still OK, and expand on the commit log, please?

Regards,
Yann E. MORIN.

Quoted 86 lines
---
 package/mesa3d/Config.in | 36 ++++++++++++++++++++++++++++++++++++
 package/mesa3d/mesa3d.mk |  6 ++++++
 2 files changed, 42 insertions(+)
package/mesa3d/Config.in +36 -0
index dbfc59bad5..b8b8451bbd 100644
@@ -414,8 +414,40 @@ config BR2_PACKAGE_MESA3D_OPENGL_GLX
 comment "OpenGL GLX support needs X11"
 	depends on !BR2_PACKAGE_XORG7
 
+if BR2_PACKAGE_MESA3D_OPENGL_GLX
+
+choice
+	prompt "GLX platform"
+
+config BR2_PACKAGE_MESA3D_OPENGL_GLX_DRI
+	bool "dri"
+
+config BR2_PACKAGE_MESA3D_OPENGL_GLX_XLIB
+	bool "xlib"
+	depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER
+
+comment "xlib conflicts with any mesa3d dri drivers"
+	depends on BR2_PACKAGE_MESA3D_DRI_DRIVER
+
+config BR2_PACKAGE_MESA3D_OPENGL_GLX_GALLIUM_XLIB
+	bool "gallium-xlib"
+	depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER
+	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
+
+comment "gallium-xlib conflicts with any mesa3d dri drivers and requires gallium w/ swrast"
+	depends on BR2_PACKAGE_MESA3D_DRI_DRIVER || \
+		!BR2_PACKAGE_MESA3D_GALLIUM_DRIVER || \
+		!BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
+
+endchoice
+
+endif
+
 config BR2_PACKAGE_MESA3D_OPENGL_EGL
 	bool "OpenGL EGL"
+	depends on !BR2_PACKAGE_MESA3D_OPENGL_GLX || \
+		BR2_PACKAGE_MESA3D_OPENGL_GLX_DRI
 	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
 	select BR2_PACKAGE_MESA3D_GBM
@@ -423,6 +455,10 @@ config BR2_PACKAGE_MESA3D_OPENGL_EGL
 	  Use the Khronos EGL APIs. EGL is a window manager for OpenGL
 	  applications similar to GLX, for X, and WGL, for Windows.
 
+comment "OpenGL EGL is incompatible w/ non-dri GLX platforms"
+	depends on BR2_PACKAGE_MESA3D_OPENGL_GLX
+	depends on !BR2_PACKAGE_MESA3D_OPENGL_GLX_DRI
+
 config BR2_PACKAGE_MESA3D_OPENGL_ES
 	bool "OpenGL ES"
 	select BR2_PACKAGE_HAS_LIBGLES
package/mesa3d/mesa3d.mk +6 -0
index c14716bf15..a853454e05 100644
@@ -57,7 +57,13 @@ ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
 #  dri          : dri based GLX requires at least one DRI driver || dri based GLX requires shared-glapi
 #  xlib         : xlib conflicts with any dri driver
 #  gallium-xlib : Gallium-xlib based GLX requires at least one gallium driver || Gallium-xlib based GLX requires softpipe or llvmpipe || gallium-xlib conflicts with any dri driver.
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX_DRI),y)
 MESA3D_CONF_OPTS += -Dglx=dri
+else ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX_XLIB),y)
+MESA3D_CONF_OPTS += -Dglx=xlib
+else ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX_GALLIUM_XLIB),y)
+MESA3D_CONF_OPTS += -Dglx=gallium-xlib
+endif
 ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y)
 MESA3D_CONF_OPTS += -Dgallium-xa=true
 else
Signature · 6 lines
2.20.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.  |
'------------------------------^-------^------------------^--------------------'