All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/piglit: Only support mesa and nvidia OpenGL provider
@ 2020-11-14 14:45 Romain Naour
  2020-11-14 15:25 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Romain Naour @ 2020-11-14 14:45 UTC (permalink / raw)
  To: buildroot

Even if piglit could be used to test any OpenGl implementation, it's really a
mesa's project because it follow closely the mesa implementation (API).

Other OpenGl vendor (binary blob) are quickly out of date and incompatible with
piglit. Especially ARM OpenGl vendors such TI, Allwinner (sunxi) and rpi.

So introduce BR2_PACKAGE_PIGLIT_SUPPORTED_GL_PROVIDERS to list all supported
OpenGL providers. For now only mesa and Nvidia are supported.

Fixes:
[BR2_PACKAGE_PROVIDES_LIBEGL="sunxi-mali-mainline"]:
http://autobuild.buildroot.net/results/76212834a3065c4c3d479a49a16297d4679098a0

[BR2_PACKAGE_PROVIDES_LIBEGL="rpi-userland"]:
http://autobuild.buildroot.net/results/2cb799919d47e57eb401b7ece00b65707f9bd3ec

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/piglit/Config.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/package/piglit/Config.in b/package/piglit/Config.in
index 736fd95d71..bfa2ba4e9a 100644
--- a/package/piglit/Config.in
+++ b/package/piglit/Config.in
@@ -1,7 +1,19 @@
+config BR2_PACKAGE_PIGLIT_SUPPORTED_GL_PROVIDERS
+	bool
+	# Only mesa3d is officially supported, other opengl provider
+	# (binary blob) could break piglit at build or runtime.
+	# At least the binary-only driver blob for NVidia cards is
+	# still able to build piglit.
+	default y if BR2_PACKAGE_MESA3D_OPENGL_GLX || \
+		BR2_PACKAGE_MESA3D_OPENGL_EGL || \
+		BR2_PACKAGE_MESA3D_OPENGL_ES || \
+		BR2_PACKAGE_NVIDIA_DRIVER_XORG
+
 config BR2_PACKAGE_PIGLIT
 	bool "piglit"
 	depends on BR2_PACKAGE_PYTHON3 # python3 only script
 	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_PIGLIT_SUPPORTED_GL_PROVIDERS
 	depends on BR2_PACKAGE_WAFFLE_SUPPORTS_GLX || \
 		BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND || \
 		BR2_PACKAGE_WAFFLE_SUPPORTS_X11_EGL || \
@@ -32,4 +44,5 @@ config BR2_PACKAGE_PIGLIT
 	  https://piglit.freedesktop.org
 
 comment "piglit needs glibc or musl"
+	depends on BR2_PACKAGE_PIGLIT_SUPPORTED_GL_PROVIDERS
 	depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)
-- 
2.25.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/piglit: Only support mesa and nvidia OpenGL provider
  2020-11-14 14:45 [Buildroot] [PATCH] package/piglit: Only support mesa and nvidia OpenGL provider Romain Naour
@ 2020-11-14 15:25 ` Thomas Petazzoni
  2020-11-15 10:24   ` Romain Naour
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2020-11-14 15:25 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 14 Nov 2020 15:45:54 +0100
Romain Naour <romain.naour@gmail.com> wrote:

> Even if piglit could be used to test any OpenGl implementation, it's really a
> mesa's project because it follow closely the mesa implementation (API).
> 
> Other OpenGl vendor (binary blob) are quickly out of date and incompatible with
> piglit. Especially ARM OpenGl vendors such TI, Allwinner (sunxi) and rpi.
> 
> So introduce BR2_PACKAGE_PIGLIT_SUPPORTED_GL_PROVIDERS to list all supported
> OpenGL providers. For now only mesa and Nvidia are supported.
> 
> Fixes:
> [BR2_PACKAGE_PROVIDES_LIBEGL="sunxi-mali-mainline"]:
> http://autobuild.buildroot.net/results/76212834a3065c4c3d479a49a16297d4679098a0
> 
> [BR2_PACKAGE_PROVIDES_LIBEGL="rpi-userland"]:
> http://autobuild.buildroot.net/results/2cb799919d47e57eb401b7ece00b65707f9bd3ec

I'm not sure this is the best way to handle this. Perhaps we need to
have a better handling of OpenGL/EGL versions.

Indeed, looking at the failures with sunxi-mali-mainline, the issue is
that some EGLDeviceEXT stuff is used. From a quick look, this seems to
be related to the EXT_device_base EGL extension, documented at
https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_base.txt,
and which appeared in EGL 1.5.

So perhaps we should instead have some logic that allows OpenGL and EGL
providers to also declare which version of the OpenGL/EGL spec they
provide, so that users can appropriate depend on OpenEGL and EGL
providers that are suitable ?

This is something I already intend to work on about libgbm: we need a
virtual package for libgbm, but not all OpenGL implementations provide
the same version of the libgbm API.

What do you think ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/piglit: Only support mesa and nvidia OpenGL provider
  2020-11-14 15:25 ` Thomas Petazzoni
@ 2020-11-15 10:24   ` Romain Naour
  2021-01-23 21:39     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Romain Naour @ 2020-11-15 10:24 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

Le 14/11/2020 ? 16:25, Thomas Petazzoni a ?crit?:
> Hello,
> 
> On Sat, 14 Nov 2020 15:45:54 +0100
> Romain Naour <romain.naour@gmail.com> wrote:
> 
>> Even if piglit could be used to test any OpenGl implementation, it's really a
>> mesa's project because it follow closely the mesa implementation (API).
>>
>> Other OpenGl vendor (binary blob) are quickly out of date and incompatible with
>> piglit. Especially ARM OpenGl vendors such TI, Allwinner (sunxi) and rpi.
>>
>> So introduce BR2_PACKAGE_PIGLIT_SUPPORTED_GL_PROVIDERS to list all supported
>> OpenGL providers. For now only mesa and Nvidia are supported.
>>
>> Fixes:
>> [BR2_PACKAGE_PROVIDES_LIBEGL="sunxi-mali-mainline"]:
>> http://autobuild.buildroot.net/results/76212834a3065c4c3d479a49a16297d4679098a0
>>
>> [BR2_PACKAGE_PROVIDES_LIBEGL="rpi-userland"]:
>> http://autobuild.buildroot.net/results/2cb799919d47e57eb401b7ece00b65707f9bd3ec
> 
> I'm not sure this is the best way to handle this. Perhaps we need to
> have a better handling of OpenGL/EGL versions.
> 
> Indeed, looking at the failures with sunxi-mali-mainline, the issue is
> that some EGLDeviceEXT stuff is used. From a quick look, this seems to
> be related to the EXT_device_base EGL extension, documented at
> https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_base.txt,
> and which appeared in EGL 1.5.

Indeed, that what I meant by "mesa implementation (API)"
(ok my explanation was not really precise :p)

> 
> So perhaps we should instead have some logic that allows OpenGL and EGL
> providers to also declare which version of the OpenGL/EGL spec they
> provide, so that users can appropriate depend on OpenEGL and EGL
> providers that are suitable ?

Something like BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION ?

> 
> This is something I already intend to work on about libgbm: we need a
> virtual package for libgbm, but not all OpenGL implementations provide
> the same version of the libgbm API.
> 
> What do you think ?

I believe it's worth the effort if other packages can also benefit from
OpenGL/EGL version spec provided by providers.

For piglit, I'm not sure. (I'm only using/testing piglit with mesa).
Piglit will always requires the same OpenGL/EGL API than mesa package.

I guess piglit still build with nvidia provider because it's not yet out of date.

Best regards,
Romain

> 
> Thomas
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] package/piglit: Only support mesa and nvidia OpenGL provider
  2020-11-15 10:24   ` Romain Naour
@ 2021-01-23 21:39     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2021-01-23 21:39 UTC (permalink / raw)
  To: buildroot

On Sun, 15 Nov 2020 11:24:24 +0100
Romain Naour <romain.naour@gmail.com> wrote:

> > So perhaps we should instead have some logic that allows OpenGL and EGL
> > providers to also declare which version of the OpenGL/EGL spec they
> > provide, so that users can appropriate depend on OpenEGL and EGL
> > providers that are suitable ?  
> 
> Something like BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION ?

Yes, I'd rather work in terms of OpenGL/EGL versions or features
provided by the different OpenGL providers, rather than ad-hoc
conditions in each user of OpenGL APIs.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-23 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-14 14:45 [Buildroot] [PATCH] package/piglit: Only support mesa and nvidia OpenGL provider Romain Naour
2020-11-14 15:25 ` Thomas Petazzoni
2020-11-15 10:24   ` Romain Naour
2021-01-23 21:39     ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.