[RFC] mesa-gl: add GL-only Mesa recipe

Submitted by Ross Burton on Sept. 9, 2013, 12:26 p.m.

Details

Message ID 1378729614-11794-1-git-send-email-ross.burton@intel.com
State New
Headers show

Commit Message

Ross Burton Sept. 9, 2013, 12:26 p.m.
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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 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

Patch hide | download patch | download mbox

diff --git a/meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb b/meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb
new file mode 100644
index 0000000..521a830
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb
@@ -0,0 +1,5 @@ 
+require mesa_${PV}.bb
+
+FILESPATH = "${FILE_DIRNAME}/mesa-${PV}:${FILE_DIRNAME}/mesa"
+
+PACKAGECONFIG ??= "dri gl"

Comments

Nitin A Kamble Sept. 9, 2013, 4:57 p.m.
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



> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of Ross Burton
> Sent: Monday, September 09, 2013 5:27 AM
> To: openembedded-core@lists.openembedded.org
> 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.
> 
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  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
> 
> diff --git a/meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb b/meta/recipes-
> graphics/mesa/mesa-gl_9.1.6.bb
> new file mode 100644
> index 0000000..521a830
> --- /dev/null
> +++ b/meta/recipes-graphics/mesa/mesa-gl_9.1.6.bb
> @@ -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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Denys Dmytriyenko Sept. 9, 2013, 5:24 p.m.
On Mon, Sep 09, 2013 at 04:57:40PM +0000, Kamble, Nitin A wrote:
> 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.
Ross Burton Sept. 10, 2013, 9:51 a.m.
On 9 September 2013 17:57, Kamble, Nitin A <nitin.a.kamble@intel.com> wrote:
>   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.

> 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
Nitin A Kamble Sept. 11, 2013, 12:23 a.m.
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



> -----Original Message-----
> From: Burton, Ross [mailto:ross.burton@intel.com]
> Sent: Tuesday, September 10, 2013 2:52 AM
> To: Kamble, Nitin A
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [RFC][PATCH] mesa-gl: add GL-only Mesa recipe
> 
> On 9 September 2013 17:57, Kamble, Nitin A <nitin.a.kamble@intel.com>
> wrote:
> >   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.
> 
> > 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
Ross Burton Sept. 11, 2013, 1:08 p.m.
On 11 September 2013 01:23, Kamble, Nitin A <nitin.a.kamble@intel.com> wrote:
> 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.

> 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
Nitin A Kamble Sept. 14, 2013, 12:49 a.m.
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


> -----Original Message-----
> From: Burton, Ross [mailto:ross.burton@intel.com]
> Sent: Wednesday, September 11, 2013 6:09 AM
> To: Kamble, Nitin A
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [RFC][PATCH] mesa-gl: add GL-only Mesa recipe
> 
> On 11 September 2013 01:23, Kamble, Nitin A <nitin.a.kamble@intel.com>
> wrote:
> > 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.
> 
> > 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
Ross Burton Sept. 16, 2013, 3 p.m.
On 14 September 2013 01:49, Kamble, Nitin A <nitin.a.kamble@intel.com> wrote:
> 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.

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

Looks good to me.

Ross
Ross Burton Sept. 16, 2013, 3:01 p.m.
On 16 September 2013 16:00, Burton, Ross <ross.burton@intel.com> wrote:
> The change to separatebuilddir.inc seems wrong

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

Ross
Nitin A Kamble Sept. 16, 2013, 4:16 p.m.
> -----Original Message-----
> From: Burton, Ross [mailto:ross.burton@intel.com]
> Sent: Monday, September 16, 2013 8:00 AM
> To: Kamble, Nitin A
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [RFC][PATCH] mesa-gl: add GL-only Mesa recipe
> 
> On 14 September 2013 01:49, Kamble, Nitin A <nitin.a.kamble@intel.com>
> wrote:
> > 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



> I'll send my branch shortly.
> 
> > http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-contrib/log/?h=ni
> > tin/mesagl
> 
> Looks good to me.
> 
> Ross
Ross Burton Sept. 16, 2013, 5:59 p.m.
On 16 September 2013 17:16, Kamble, Nitin A <nitin.a.kamble@intel.com> wrote:
> 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