Skip to contentSkip to conversation

mesa-gl: The purpose of mesa-gl is to provide for X11 usage

PATCH In review Mark Hatle 7 participants 14 messages Mar 25, 2020 – Mar 30, 2020 1 message not in the archive

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

PATCH 1/1 mesa-gl: The purpose of mesa-gl is to provide for X11 usage

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -2
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 8 lines · Mark Hatle

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

Hmm. That's not good. There are embedded devices that provide EGL/GLES support through own stack, but fall back on MESA for full desktop GL support. That's been working to some extent even with Wayland and w/o X11. With your change that won't be possible any more...

Signature · 1 line
Denys
Quoted 24 lines
---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -2
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
Signature · 1 line
2.17.1
author
#2 lore raw
Quoted 11 lines · Mark Hatle
Quoted 9 lines

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one
windowing system or classic osmesa

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

Quoted 7 lines

Hmm. That's not good. There are embedded devices that provide EGL/GLES support
through own stack, but fall back on MESA for full desktop GL support. That's
been working to some extent even with Wayland and w/o X11. With your change
that won't be possible any more...

Have you tried any of these? This hasn't been working since Zeus with an external libmali and non-X11 configuration. It returns the error listed in the commit message "ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa" during configuration.

Ross and I talked about it and he said this was specific to X11 implementation and wasn't meant to work for other implementations. (fbdev/QT/etc.)

If Wayland is supposed to work, then someone needs to go in and adjust the configuration to also support Wayland. I don't have any Wayland systems to even know what the right configuration COULD be.

The specific configuration I'm running has "OpenGL" in the DISTRO_FEATURE, but does NOT have X11 or Wayland".

DISTRO_FEATURES_append = " opengl"
DISTRO_FEATURES_remove = "x11 wayland"

--Mark

Quoted 32 lines

--
Denys

Quoted 27 lines
---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +0 -1
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',

'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"

meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -1
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
--

2.17.1

#3 lore raw

To be honest, I would just take the entire recipe out. It's causing trouble during updates, isn't being tested neither for builds nor at runtime, and is supposed to provide some specific configuration which as this discussion makes clear, nobody seems to quite understand.

Alex

Quoted 77 lines · Mark Hatle
Quoted 11 lines · Mark Hatle
Quoted 9 lines

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one
windowing system or classic osmesa

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

Quoted 7 lines

Hmm. That's not good. There are embedded devices that provide EGL/GLES support
through own stack, but fall back on MESA for full desktop GL support. That's
been working to some extent even with Wayland and w/o X11. With your change
that won't be possible any more...

Have you tried any of these? This hasn't been working since Zeus with an external libmali and non-X11 configuration. It returns the error listed in the commit message "ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa" during configuration.

Ross and I talked about it and he said this was specific to X11 implementation and wasn't meant to work for other implementations. (fbdev/QT/etc.)

If Wayland is supposed to work, then someone needs to go in and adjust the configuration to also support Wayland. I don't have any Wayland systems to even know what the right configuration COULD be.

The specific configuration I'm running has "OpenGL" in the DISTRO_FEATURE, but does NOT have X11 or Wayland".

DISTRO_FEATURES_append = " opengl"
DISTRO_FEATURES_remove = "x11 wayland"

--Mark

Quoted 32 lines

--
Denys

Quoted 27 lines
---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +0 -1
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',

'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"

meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -1
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
--

2.17.1

author
#4 lore raw
Quoted 6 lines

To be honest, I would just take the entire recipe out. It's causing trouble
during updates, isn't being tested neither for builds nor at runtime, and is supposed to provide some specific configuration which as this discussion
makes clear, nobody seems to quite understand.

With the abomination that is libmali (and similar), it is still needed. It's the only way to support GL on a primarily GLES compatible system.

The problem is the way they do this seems to be a custom version of libdrm, which then conflicts with the mesa version. Thus the issues.

I'm happy to continue testing my particular needs now and the future (thus the patch against master.)

What we absolutely don't want is a different version of this for every system that has a custom graphics chip in it. That would be a far larger nightmare than what is currently implemented. The key to this is to come to an agreement on what should work and how it should be configured. As of right now, the only working configuration I can find is X11.

--Mark

Quoted 89 lines

Alex

Quoted 83 lines · Mark Hatle
Quoted 2 lines · Mark Hatle
Quoted 1 line

Trying to build mesa-gl without X11 enabled, results in numerous

errors

Quoted 3 lines
Quoted 3 lines

about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least

one

Quoted 4 lines
Quoted 4 lines

windowing system or classic osmesa

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid

the

Quoted 9 lines
Quoted 1 line

error message above.

Hmm. That's not good. There are embedded devices that provide EGL/GLES support
through own stack, but fall back on MESA for full desktop GL support. That's
been working to some extent even with Wayland and w/o X11. With your change
that won't be possible any more...

Have you tried any of these? This hasn't been working since Zeus with an
external libmali and non-X11 configuration. It returns the error listed in the commit message "ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa" during configuration.

Ross and I talked about it and he said this was specific to X11 implementation and wasn't meant to work for other implementations. (fbdev/QT/etc.)

If Wayland is supposed to work, then someone needs to go in and adjust the
configuration to also support Wayland. I don't have any Wayland systems to even know what the right configuration COULD be.

The specific configuration I'm running has "OpenGL" in the DISTRO_FEATURE,
but does NOT have X11 or Wayland".

DISTRO_FEATURES_append = " opengl"
DISTRO_FEATURES_remove = "x11 wayland"

--Mark

Quoted 32 lines

--
Denys

Quoted 27 lines
---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +0 -1
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',

'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"

meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -1
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
--

2.17.1

#5 lore raw
Quoted 10 lines · Mark Hatle
Quoted 6 lines

To be honest, I would just take the entire recipe out. It's causing trouble
during updates, isn't being tested neither for builds nor at runtime, and is supposed to provide some specific configuration which as this discussion
makes clear, nobody seems to quite understand.

With the abomination that is libmali (and similar), it is still needed. It's the only way to support GL on a primarily GLES compatible system.

Quoted 6 lines

The problem is the way they do this seems to be a custom version of libdrm, which then conflicts with the mesa version. Thus the issues.

I'm happy to continue testing my particular needs now and the future (thus the patch against master.)
...

Stupid question:

Is
PREFERRED_PROVIDER_virtual/mesa = "mesa-gl"
PREFERRED_PROVIDER_virtual/libgl = "mesa-gl"
equivalent to
PACKAGECONFIG_pn-mesa = "opengl dri x11"
?

Quoted 1 line

--Mark

cu
Adrian

author
#6 lore raw
Quoted 20 lines · Mark Hatle
Quoted 11 lines
Quoted 3 lines

To be honest, I would just take the entire recipe out. It's causing trouble
during updates, isn't being tested neither for builds nor at runtime,

and

Quoted 3 lines

is supposed to provide some specific configuration which as this discussion
makes clear, nobody seems to quite understand.

With the abomination that is libmali (and similar), it is still needed. It's the only way to support GL on a primarily GLES compatible system.

Quoted 7 lines

The problem is the way they do this seems to be a custom version of libdrm, which then conflicts with the mesa version. Thus the issues.

I'm happy to continue testing my particular needs now and the future (thus
the patch against master.)
...

Quoted 8 lines

Stupid question:

Is
PREFERRED_PROVIDER_virtual/mesa = "mesa-gl"
PREFERRED_PROVIDER_virtual/libgl = "mesa-gl"
equivalent to
PACKAGECONFIG_pn-mesa = "opengl dri x11"
?

I don't know. I didn't write this.

However, doing some investigation, the big difference here is the overall capabilities. There are common distributions where a user may want to use mesa (no external libdrm) as well as distress where they want to use an external drm and the mesa-gl version only.

So 'mesa' and 'external drm + mesa-gl' are equivalent in functionality for a given distro. Only difference being optimization.

You may ask why would I use one vs the other. In my case, we have a family of SoC parts. Some of the family have a Mali graphics chip on them, while others don't have any optimized graphics so everything has to be software rendered. The only difference (from a software point of view) is if the Mali is on-board or not. So using a common (binary) distribution, and being able to just swap those parts is highly desirable.
(Does that ACTUALLY work right now, I'm not sure.. but that is what I am
working on.)

Quoted 5 lines
Quoted 1 line

--Mark

cu
Adrian

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

author
#8 lore raw
Quoted 35 lines
Quoted 12 lines · Mark Hatle
Quoted 10 lines

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one
windowing system or classic osmesa

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the
error message above.

Quoted 7 lines

Hmm. That's not good. There are embedded devices that provide EGL/GLES support
through own stack, but fall back on MESA for full desktop GL support. That's
been working to some extent even with Wayland and w/o X11. With your change
that won't be possible any more...

Have you tried any of these? This hasn't been working since Zeus with an external libmali and non-X11 configuration. It returns the error listed in the commit message "ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa" during configuration.

Ross and I talked about it and he said this was specific to X11 implementation and wasn't meant to work for other implementations. (fbdev/QT/etc.)

If Wayland is supposed to work, then someone needs to go in and adjust the configuration to also support Wayland. I don't have any Wayland systems to even know what the right configuration COULD be.

Quoted 5 lines

The specific configuration I'm running has "OpenGL" in the DISTRO_FEATURE, but does NOT have X11 or Wayland".

DISTRO_FEATURES_append = " opengl"
DISTRO_FEATURES_remove = "x11 wayland"

This can be further refined to:

conf/local.conf:

PREFERRED_PROVIDER_virtual/libgl = "mesa-gl"
PREFERRED_PROVIDER_virtual/mesa = "mesa-gl"
DISTRO_FEATURES_append = " opengl"
DISTRO_FEATURES_remove = "x11"

bitbake mesa-gl

Error is the same:

meson.build:455:4: ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa

Quoted 37 lines

--Mark

Quoted 32 lines

--
Denys

Quoted 27 lines
---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +0 -1
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',

'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"

meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -1
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
--

2.17.1

#9 lore raw
In reply to Mark Hatle
Quoted 5 lines · Mark Hatle

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa

I believe I was fighting similar issue in meta-freescale layer for imx8mm derivative [1], where the status of GPU support was not know at the time. What I did back then is set the default configuration to osmesa and used swrast in order to be able to use mesa on that derivative. After that, when GPU support has been added into Mesa - those modifications were reverted.

I guess turning to swrast in case if someone would decide _not_ to use X11 - is not a bad option here, rather than enforcing the X11 for distros which are using this recipe. Any thoughts?

Quoted 28 lines

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -3
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
--

2.17.1

Signature · 4 lines
Regards,
Andrey.

[1]: https://github.com/Freescale/meta-freescale/commit/9a2210d9ec707531436dc4b56ce655c0bf50a8a8
author
#10 lore raw
Quoted 9 lines
Quoted 6 lines · Mark Hatle

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one
windowing system or classic osmesa

Quoted 6 lines

I believe I was fighting similar issue in meta-freescale layer for imx8mm derivative [1], where the status of GPU support was not know at the time. What I did back then is set the default configuration to osmesa and used swrast in order to be able to use mesa on that derivative. After that, when GPU support has been added into Mesa - those modifications were reverted.

Do you have a pointer to that anywhere? I'm curious if any of it might still apply.. but I know nothing about mesa and what configurations are even possible.

Quoted 3 lines

I guess turning to swrast in case if someone would decide _not_ to use X11 - is not a bad option here, rather than enforcing the X11 for distros which are using this recipe. Any thoughts?

I don't know any any reasons we couldn't do this.. but like I said.. I'm a newbie when it comes to mesa.

--Mark

Quoted 40 lines
Quoted 28 lines

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +0 -1
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',

'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"

meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -1
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
--
Quoted 3 lines

2.17.1

--
Regards,
Andrey.

[1]:
https://github.com/Freescale/meta-freescale/commit/9a2210d9ec707531436dc4b56ce655c0bf50a8a8

#11 lore raw
Quoted 17 lines · Mark Hatle
Quoted 10 lines
Quoted 6 lines · Mark Hatle

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one
windowing system or classic osmesa

Quoted 6 lines

I believe I was fighting similar issue in meta-freescale layer for imx8mm derivative [1], where the status of GPU support was not know at the time. What I did back then is set the default configuration to osmesa and used swrast in order to be able to use mesa on that derivative. After that, when GPU support has been added into Mesa - those modifications were reverted.

Quoted 3 lines

Do you have a pointer to that anywhere? I'm curious if any of it might still apply.. but I know nothing about mesa and what configurations are even possible.

I've included the link to my commit in meta-freescale layer, where the PACKAGECONFIG is set to use 'classic' OSMesa and adds swrast to DRIDRIVERS. This should turn the rendering to be performed in the SW, effectively working for all backends (at the obvious performance penalty). It took me quite some digging to figure this combination out, as I also cannot claim myself an expert in mesa...

Quoted 7 lines
Quoted 4 lines

I guess turning to swrast in case if someone would decide _not_ to use X11 - is not a bad option here, rather than enforcing the X11 for distros which are using this recipe. Any thoughts?

I don't know any any reasons we couldn't do this.. but like I said.. I'm a newbie when it comes to mesa.

Maybe something like this could be used (warning: untested):
PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa',d)}"
DRIDRIVERS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', ' swrast',d)}"

Quoted 44 lines

--Mark

Quoted 40 lines
Quoted 28 lines

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +0 -1
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',

'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"

meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -1
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
--
Quoted 3 lines

2.17.1

--
Regards,
Andrey.

[1]:
https://github.com/Freescale/meta-freescale/commit/9a2210d9ec707531436dc4b56ce655c0bf50a8a8

--
Regards,
Andrey.

#12 lore raw
Quoted 23 lines · Andrey Zhizhikin
Quoted 17 lines · Mark Hatle
Quoted 10 lines
Quoted 6 lines · Mark Hatle

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one
windowing system or classic osmesa

Quoted 6 lines

I believe I was fighting similar issue in meta-freescale layer for imx8mm derivative [1], where the status of GPU support was not know at the time. What I did back then is set the default configuration to osmesa and used swrast in order to be able to use mesa on that derivative. After that, when GPU support has been added into Mesa - those modifications were reverted.

Quoted 3 lines

Do you have a pointer to that anywhere? I'm curious if any of it might still apply.. but I know nothing about mesa and what configurations are even possible.

Quoted 6 lines

I've included the link to my commit in meta-freescale layer, where the PACKAGECONFIG is set to use 'classic' OSMesa and adds swrast to DRIDRIVERS. This should turn the rendering to be performed in the SW, effectively working for all backends (at the obvious performance penalty). It took me quite some digging to figure this combination out, as I also cannot claim myself an expert in mesa...

FWIW, we also expect SW rendering for GL, while SGX/RGX cores in our SoCs accelerate EGL/GLES.

But, like Mark, I also don't know much about Mesa. Similar to what he mentioned about Mali, we used to require a custom libdrm years ago. But since then, everything has been upstreamed into main libdrm-omap driver.

Signature · 1 line
Denys
Quoted 64 lines
Quoted 6 lines
Quoted 3 lines

I guess turning to swrast in case if someone would decide _not_ to use X11 - is not a bad option here, rather than enforcing the X11 for distros which are using this recipe. Any thoughts?

I don't know any any reasons we couldn't do this.. but like I said.. I'm a newbie when it comes to mesa.

Maybe something like this could be used (warning: untested):
PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa',d)}"
DRIDRIVERS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', ' swrast',d)}"

Quoted 44 lines

--Mark

Quoted 40 lines
Quoted 28 lines

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +0 -1
index d4b1c1c454..5674c6b1fe 100644
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',

'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"

meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb +4 -1
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
--
Quoted 3 lines

2.17.1

--
Regards,
Andrey.

[1]:
https://github.com/Freescale/meta-freescale/commit/9a2210d9ec707531436dc4b56ce655c0bf50a8a8

--
Regards,
Andrey.

#13 lore raw
In reply to Mark Hatle
Quoted 11 lines · Mark Hatle

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

This is wrong. We ought to add osmesa as fallback and not hard-require X11

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
#14 lore raw
Quoted 8 lines · Otavio Salvador
Quoted 6 lines · Mark Hatle

Trying to build mesa-gl without X11 enabled, results in numerous errors about being incorrectly configured, such as:

ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa

Quoted 7 lines
Quoted 5 lines

After consulting with the author of this recipe, it was clear that it was only intended for the X11 use-case, so requring X11 should avoid the error message above.

This is wrong. We ought to add osmesa as fallback and not hard-require X11

But does anyone actually use this combination, or are we talking about ways to make it work in theory?

At the end of the day, OpenGL (not EGL, not GLES) on Linux *is* GLX and the point of this recipe was to be a software-backed GL stack for boards that only supports GLES in hardware.

Ross