Skip to contentSkip to conversation

mesa-gl: add GL-only Mesa recipe

RFC PATCH In review Ross Burton 3 participants 11 messages Sep 9, 2013 – Sep 16, 2013

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 mesa-gl: add GL-only Mesa recipe

Some machines have hardware-specific GL drivers that do EGL and GLES (many ARM boards). Others have their own EGL/GLES drivers and provide a Mesa DRI driver (EMGD). Previously adding Mesa, for software GL/GLX rendering in the first case and hardware GLX in the second, involved bbappends and changing Mesa to be machine-specific.

By adding a just-GL Mesa the machine definition can combine it with the hardware drivers cleanly.

---
 meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb |    5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb
meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb new file +5 -0
new file mode 100644
index 0000000..521a830
@@ -0,0 +1,5 @@
+require mesa_${PV}.bb
+
+FILESPATH = "${FILE_DIRNAME}/mesa-${PV}:${FILE_DIRNAME}/mesa"
+
+PACKAGECONFIG ??= "dri gl"
Signature · 1 line
1.7.10.4
#1 lore raw

Hi Ross,
This is a clever way to deal with unnecessary rebuilding of mesa we were seeing earlier. With this mesa-gl,
the mesa also need modification to remove gl from the default recipe.

Also looks like there is a need from community for mesa-gl-lib and mesa-gl-headers, as some platforms need just the mesa-gl-headers and not the libs.

Nitin

Quoted 42 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ross Burton
Sent: Monday, September 09, 2013 5:27 AM
To: [email protected]
Subject: [OE-core] [RFC][PATCH] mesa-gl: add GL-only Mesa recipe

Some machines have hardware-specific GL drivers that do EGL and GLES (many ARM boards). Others have their own EGL/GLES drivers and provide a Mesa DRI driver (EMGD). Previously adding Mesa, for software GL/GLX rendering in the first case and hardware GLX in the second, involved bbappends and changing Mesa to be machine-specific.

By adding a just-GL Mesa the machine definition can combine it with the hardware drivers cleanly.

---
 meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb |    5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb
meta/recipes- renamed from meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb +0 -0

graphics/mesa/mesa-gl_9.1.6.bb
new file mode 100644
index 0000000..521a830

meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb new file +5 -1
@@ -0,0 +1,5 @@
+require mesa_${PV}.bb
+
+FILESPATH = "${FILE_DIRNAME}/mesa-${PV}:${FILE_DIRNAME}/mesa"
+
+PACKAGECONFIG ??= "dri gl"
--

1.7.10.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 10 lines · Nitin A

Hi Ross,
This is a clever way to deal with unnecessary rebuilding of mesa we were
seeing earlier. With this mesa-gl, the mesa also need modification to remove gl from the default recipe.

Also looks like there is a need from community for mesa-gl-lib and mesa-gl-headers, as some platforms need just the mesa-gl-headers and not the libs.

Nitin

Ross, Nitin,

This is a great and very welcomed development! This would definitely allow our TI machines (and other ARM ones, as you said) to happily co-exist with Mesa software rendering.

Signature · 1 line
Denys
Quoted 46 lines
Quoted 38 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ross Burton
Sent: Monday, September 09, 2013 5:27 AM
To: [email protected]
Subject: [OE-core] [RFC][PATCH] mesa-gl: add GL-only Mesa recipe

Some machines have hardware-specific GL drivers that do EGL and GLES (many ARM boards). Others have their own EGL/GLES drivers and provide a Mesa DRI driver (EMGD). Previously adding Mesa, for software GL/GLX rendering in the first case and hardware GLX in the second, involved bbappends and changing Mesa to be machine-specific.

By adding a just-GL Mesa the machine definition can combine it with the hardware drivers cleanly.

---
 meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb |    5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb
meta/recipes- renamed from meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb +0 -0

graphics/mesa/mesa-gl_9.1.6.bb
new file mode 100644
index 0000000..521a830

meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb new file +5 -1
@@ -0,0 +1,5 @@
+require mesa_${PV}.bb
+
+FILESPATH = "${FILE_DIRNAME}/mesa-${PV}:${FILE_DIRNAME}/mesa"
+
+PACKAGECONFIG ??= "dri gl"
--

1.7.10.4

Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
In reply to Kamble, Nitin A
Quoted 2 lines · Nitin A

This is a clever way to deal with unnecessary rebuilding of mesa we were seeing earlier. With this mesa-gl,
the mesa also need modification to remove gl from the default recipe.

No, mesa and mesa-gl intentionally conflict. mesa-gl provides GL, emgd-driver-bin provides EGL and GLES, your machines shouldn't need both mesa and mesa-gl.

Quoted 2 lines

Also looks like there is a need from community for mesa-gl-lib and mesa-gl-headers, as some platforms need just the mesa-gl-headers and not the libs.

To be honest GL platforms that don't ship their own headers are *totally broken* and using mesa's headers is basically the same as crossing your fingers and praying to $DEITY. Platforms that do this need to be fixed, not worked around, and taking Mesa's headers without editing them is just wrong.

Ross

#4 lore raw

With few more fixes, this is working for EMGD based meta-intel BSPs. Here are the commits which worked:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=nitin/mesa-gl
http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-contrib/log/?h=nitin/mesa-gl

BTW the same functionality can also be implemented by customizing current mesa recipe based on a new machine feature which can be called as "custom-gles" or "no-mesa-gles"

BTW in other context, this does not help for the rebuild issue RP was mentioning earlier.

Thanks,
Nitin

Quoted 28 lines

-----Original Message-----
From: Burton, Ross [mailto:[email protected]]
Sent: Tuesday, September 10, 2013 2:52 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [RFC][PATCH] mesa-gl: add GL-only Mesa recipe

Quoted 2 lines · Nitin A

This is a clever way to deal with unnecessary rebuilding of mesa we
were seeing earlier. With this mesa-gl, the mesa also need modification to

remove gl from the default recipe.

No, mesa and mesa-gl intentionally conflict. mesa-gl provides GL, emgd- driver-bin provides EGL and GLES, your machines shouldn't need both mesa and mesa-gl.

Quoted 2 lines

Also looks like there is a need from community for mesa-gl-lib and mesa-gl-headers, as some platforms need just the mesa-gl-headers and

not the libs.

To be honest GL platforms that don't ship their own headers are *totally broken* and using mesa's headers is basically the same as crossing your fingers and praying to $DEITY. Platforms that do this need to be fixed, not worked around, and taking Mesa's headers without editing them is just wrong.

Ross

#5 lore raw
Quoted 4 lines · Nitin A

With few more fixes, this is working for EMGD based meta-intel BSPs. Here are the commits which worked:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=nitin/mesa-gl

The dependency on "mesa" is actually right, any other GL implementation may or may not provide the DRI interface, which is what X is depending on.

I've updated my mesagl branch to add a virtual/mesa provider.

Quoted 1 line

http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-contrib/log/?h=nitin/mesa-gl

Add a preferred provider of virtual/mesa="mesa-gl" in here and I think you'll be sorted.

Ross

#6 lore raw

Hi Ross,
I have updated my branches accordingly here.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=nitin/mesagl
http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-contrib/log/?h=nitin/mesagl

I have tested this with emenlow BSP. If it looks ok to you, I can send these for upstreaming.

Thanks,
Nitin

Quoted 27 lines

-----Original Message-----
From: Burton, Ross [mailto:[email protected]]
Sent: Wednesday, September 11, 2013 6:09 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [RFC][PATCH] mesa-gl: add GL-only Mesa recipe

Quoted 5 lines · Nitin A

With few more fixes, this is working for EMGD based meta-intel BSPs. Here are the commits which worked:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=nitin
/mesa-gl

The dependency on "mesa" is actually right, any other GL implementation may or may not provide the DRI interface, which is what X is depending on.

I've updated my mesagl branch to add a virtual/mesa provider.

Quoted 2 lines

http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-contrib/log/?h=ni
tin/mesa-gl

Add a preferred provider of virtual/mesa="mesa-gl" in here and I think you'll be sorted.

Ross

#7 lore raw
Quoted 1 line · Nitin A

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=nitin/mesagl

The change to separatebuilddir.inc seems wrong and I merged your dri change to mesa-gl.bb into my branch which had moved on since you looked at it. You won't need a PROVIDES in mesa-gl as it's in mesa.inc.

I'll send my branch shortly.

Quoted 1 line

http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-contrib/log/?h=nitin/mesagl

Looks good to me.

Ross

#8 lore raw
Quoted 1 line · Ross

The change to separatebuilddir.inc seems wrong

Can't read diffs, thanks for the fix. ;)

Ross

#9 lore raw
In reply to Burton, Ross
Quoted 9 lines

-----Original Message-----
From: Burton, Ross [mailto:[email protected]]
Sent: Monday, September 16, 2013 8:00 AM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [RFC][PATCH] mesa-gl: add GL-only Mesa recipe

Quoted 9 lines
Quoted 2 lines · Nitin A

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=nitin/me
sagl

The change to separatebuilddir.inc seems wrong and I merged your dri change to mesa-gl.bb into my branch which had moved on since you looked at it. You won't need a PROVIDES in mesa-gl as it's in mesa.inc.

Ross,

The PROVIDES from mesa.inc is not what mesa-gl recipe provides. Mesa-gl is dropping gles & elg components, and that should be reflected in the PROVIDES. Right?

Nitin

Quoted 8 lines

I'll send my branch shortly.

Quoted 2 lines

http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-contrib/log/?h=ni
tin/mesagl

Looks good to me.

Ross

#10 lore raw
Quoted 2 lines · Nitin A

The PROVIDES from mesa.inc is not what mesa-gl recipe provides. Mesa-gl is dropping gles & elg components, and that should be reflected in the PROVIDES. Right?

Urgh, yes. That will teach me for grabbing an hour of work in between being dad. V2 incoming.

Ross