[1/5] mesa: Enable gallium-llvm on x86 and x86_64

Submitted by Khem Raj on Aug. 20, 2018, 6:59 p.m. | Patch ID: 153921

Details

Message ID 011962bd47ca60969fa50a3e890adadd6bddc487.1534791421.git.raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Aug. 20, 2018, 6:59 p.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-graphics/cairo/cairo.inc | 3 ++-
 meta/recipes-graphics/mesa/mesa.inc   | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
index 20e0d2c92a..7347f223ff 100644
--- a/meta/recipes-graphics/cairo/cairo.inc
+++ b/meta/recipes-graphics/cairo/cairo.inc
@@ -22,7 +22,8 @@  X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
-           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
+           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
 
 PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
 PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 5afd0db4b7..dd626d9f00 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -48,6 +48,9 @@  PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
 		   "
 
+PACKAGECONFIG_append_x86 = " gallium-llvm gallium r600"
+PACKAGECONFIG_append_x86-64 = " gallium-llvm gallium r600"
+
 # "gbm" requires "dri", "opengl"
 PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
 

Comments

Andreas Müller Aug. 27, 2018, 9:15 p.m.
On Mon, Aug 20, 2018 at 8:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-graphics/cairo/cairo.inc | 3 ++-
>  meta/recipes-graphics/mesa/mesa.inc   | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
> index 20e0d2c92a..7347f223ff 100644
> --- a/meta/recipes-graphics/cairo/cairo.inc
> +++ b/meta/recipes-graphics/cairo/cairo.inc
> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>
>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
> -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
> +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
> +           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
>
>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index 5afd0db4b7..dd626d9f00 100644
^ I think this came in accidentaly and it breaks builds when adding
packageconfig glesv2:

| configure: error: use either --enable-gl=yes or --enable-glesv2=yes.
Not both at the same time.

Please check

Andreas
Khem Raj Aug. 27, 2018, 10:55 p.m.
On Mon, Aug 27, 2018 at 2:15 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
>
> On Mon, Aug 20, 2018 at 8:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  meta/recipes-graphics/cairo/cairo.inc | 3 ++-
> >  meta/recipes-graphics/mesa/mesa.inc   | 3 +++
> >  2 files changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
> > index 20e0d2c92a..7347f223ff 100644
> > --- a/meta/recipes-graphics/cairo/cairo.inc
> > +++ b/meta/recipes-graphics/cairo/cairo.inc
> > @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
> >  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
> >
> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
> > -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
> > +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
> > +           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
> >
> >  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
> >  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> > index 5afd0db4b7..dd626d9f00 100644
> ^ I think this came in accidentaly and it breaks builds when adding
> packageconfig glesv2:
>
> | configure: error: use either --enable-gl=yes or --enable-glesv2=yes.
> Not both at the same time.

do you remove opengl from DISTRO_FEATURES when enabling glesv2 ?
try that out.

>
> Please check
>
> Andreas
Andreas Müller Aug. 28, 2018, 6:43 a.m.
On Tue, Aug 28, 2018 at 12:55 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Mon, Aug 27, 2018 at 2:15 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
>>
>> On Mon, Aug 20, 2018 at 8:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > ---
>> >  meta/recipes-graphics/cairo/cairo.inc | 3 ++-
>> >  meta/recipes-graphics/mesa/mesa.inc   | 3 +++
>> >  2 files changed, 5 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
>> > index 20e0d2c92a..7347f223ff 100644
>> > --- a/meta/recipes-graphics/cairo/cairo.inc
>> > +++ b/meta/recipes-graphics/cairo/cairo.inc
>> > @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>> >  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>> >
>> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
>> > -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
>> > +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
>> > +           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
>> >
>> >  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
>> >  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
>> > index 5afd0db4b7..dd626d9f00 100644
>> ^ I think this came in accidentaly and it breaks builds when adding
>> packageconfig glesv2:
>>
>> | configure: error: use either --enable-gl=yes or --enable-glesv2=yes.
>> Not both at the same time.
>
> do you remove opengl from DISTRO_FEATURES when enabling glesv2 ?
> try that out.
>
>>
Yes of course I can. But this patch is wrong - we don't have gles as
distro feature - and it is not even mentioned in commit message why
this is done.

Andreas
Andreas Müller Aug. 28, 2018, 5:21 p.m.
On Tue, Aug 28, 2018 at 8:43 AM, Andreas Müller <schnitzeltony@gmail.com> wrote:
> On Tue, Aug 28, 2018 at 12:55 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Mon, Aug 27, 2018 at 2:15 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
>>>
>>> On Mon, Aug 20, 2018 at 8:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
>>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> > ---
>>> >  meta/recipes-graphics/cairo/cairo.inc | 3 ++-
>>> >  meta/recipes-graphics/mesa/mesa.inc   | 3 +++
>>> >  2 files changed, 5 insertions(+), 1 deletion(-)
>>> >
>>> > diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
>>> > index 20e0d2c92a..7347f223ff 100644
>>> > --- a/meta/recipes-graphics/cairo/cairo.inc
>>> > +++ b/meta/recipes-graphics/cairo/cairo.inc
>>> > @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>>> >  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>>> >
>>> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
>>> > -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
>>> > +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
>>> > +           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
>>> >
>>> >  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
>>> >  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>>> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
>>> > index 5afd0db4b7..dd626d9f00 100644
>>> ^ I think this came in accidentaly and it breaks builds when adding
>>> packageconfig glesv2:
>>>
>>> | configure: error: use either --enable-gl=yes or --enable-glesv2=yes.
>>> Not both at the same time.
>>
>> do you remove opengl from DISTRO_FEATURES when enabling glesv2 ?
>> try that out.
>>
>>>
> Yes of course I can. But this patch is wrong - we don't have gles as
> distro feature - and it is not even mentioned in commit message why
> this is done.
>
I am tempted to send a revert for the cairo part:

* Cross: It changes defaults valid for long time
* Native: As far as I can remember it causes trouble for cairo-native
* It went through without mentioning

Andreas
Khem Raj Aug. 28, 2018, 5:36 p.m.
Hi Andreas

On Tue, Aug 28, 2018 at 10:21 AM Andreas Müller <schnitzeltony@gmail.com> wrote:
>
> On Tue, Aug 28, 2018 at 8:43 AM, Andreas Müller <schnitzeltony@gmail.com> wrote:
> > On Tue, Aug 28, 2018 at 12:55 AM, Khem Raj <raj.khem@gmail.com> wrote:
> >> On Mon, Aug 27, 2018 at 2:15 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
> >>>
> >>> On Mon, Aug 20, 2018 at 8:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
> >>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >>> > ---
> >>> >  meta/recipes-graphics/cairo/cairo.inc | 3 ++-
> >>> >  meta/recipes-graphics/mesa/mesa.inc   | 3 +++
> >>> >  2 files changed, 5 insertions(+), 1 deletion(-)
> >>> >
> >>> > diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
> >>> > index 20e0d2c92a..7347f223ff 100644
> >>> > --- a/meta/recipes-graphics/cairo/cairo.inc
> >>> > +++ b/meta/recipes-graphics/cairo/cairo.inc
> >>> > @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
> >>> >  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
> >>> >
> >>> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
> >>> > -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
> >>> > +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
> >>> > +           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
> >>> >
> >>> >  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
> >>> >  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
> >>> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> >>> > index 5afd0db4b7..dd626d9f00 100644
> >>> ^ I think this came in accidentaly and it breaks builds when adding
> >>> packageconfig glesv2:
> >>>
> >>> | configure: error: use either --enable-gl=yes or --enable-glesv2=yes.
> >>> Not both at the same time.
> >>
> >> do you remove opengl from DISTRO_FEATURES when enabling glesv2 ?
> >> try that out.
> >>
> >>>
> > Yes of course I can. But this patch is wrong - we don't have gles as
> > distro feature - and it is not even mentioned in commit message why
> > this is done.
> >
> I am tempted to send a revert for the cairo part:
>
> * Cross: It changes defaults valid for long time
> * Native: As far as I can remember it causes trouble for cairo-native
> * It went through without mentioning

opengl as a DISTRO_FEATURE should tie into packageconfigs, the
situation before this patch was not ideal, people got to work with it.

as seen in the example you cited, we can't mix opengl and gles support
in packages. other layers have solved your kind of usecase like below

https://github.com/WebPlatformForEmbedded/meta-wpe/blob/master/recipes-graphics/cairo/cairo_%.bbappend



>
> Andreas
Andreas Müller Aug. 28, 2018, 6:28 p.m.
On Tue, Aug 28, 2018 at 7:36 PM, Khem Raj <raj.khem@gmail.com> wrote:
> Hi Andreas
>
> On Tue, Aug 28, 2018 at 10:21 AM Andreas Müller <schnitzeltony@gmail.com> wrote:
>>
>> On Tue, Aug 28, 2018 at 8:43 AM, Andreas Müller <schnitzeltony@gmail.com> wrote:
>> > On Tue, Aug 28, 2018 at 12:55 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> >> On Mon, Aug 27, 2018 at 2:15 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
>> >>>
>> >>> On Mon, Aug 20, 2018 at 8:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> >>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >>> > ---
>> >>> >  meta/recipes-graphics/cairo/cairo.inc | 3 ++-
>> >>> >  meta/recipes-graphics/mesa/mesa.inc   | 3 +++
>> >>> >  2 files changed, 5 insertions(+), 1 deletion(-)
>> >>> >
>> >>> > diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
>> >>> > index 20e0d2c92a..7347f223ff 100644
>> >>> > --- a/meta/recipes-graphics/cairo/cairo.inc
>> >>> > +++ b/meta/recipes-graphics/cairo/cairo.inc
>> >>> > @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>> >>> >  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>> >>> >
>> >>> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
>> >>> > -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
>> >>> > +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
>> >>> > +           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
>> >>> >
>> >>> >  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
>> >>> >  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>> >>> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
>> >>> > index 5afd0db4b7..dd626d9f00 100644
>> >>> ^ I think this came in accidentaly and it breaks builds when adding
>> >>> packageconfig glesv2:
>> >>>
>> >>> | configure: error: use either --enable-gl=yes or --enable-glesv2=yes.
>> >>> Not both at the same time.
>> >>
>> >> do you remove opengl from DISTRO_FEATURES when enabling glesv2 ?
>> >> try that out.
>> >>
>> >>>
>> > Yes of course I can. But this patch is wrong - we don't have gles as
>> > distro feature - and it is not even mentioned in commit message why
>> > this is done.
>> >
>> I am tempted to send a revert for the cairo part:
>>
>> * Cross: It changes defaults valid for long time
>> * Native: As far as I can remember it causes trouble for cairo-native
>> * It went through without mentioning
>
> opengl as a DISTRO_FEATURE should tie into packageconfigs, the
> situation before this patch was not ideal, people got to work with it.
>
> as seen in the example you cited, we can't mix opengl and gles support
> in packages. other layers have solved your kind of usecase like below
>
> https://github.com/WebPlatformForEmbedded/meta-wpe/blob/master/recipes-graphics/cairo/cairo_%.bbappend
* ^The link is broken
* Am quite sure that it breaks cairo-native or dependants (have no
logs at hand - it is some time ago)
* Again: I consider this a major change and it was not even
mentioned/discussed. To me it has nothing to do with 'mesa: Enable
gallium-llvm on x86 and x86_64' - btw: what does that fix?

Let's close discussion here - I think after all these years here I am
able to find a workaround in case of further issues. Thanks for
support.

Andreas
Khem Raj Aug. 28, 2018, 8:20 p.m.
Hi Andreas
On Tue, Aug 28, 2018 at 11:28 AM Andreas Müller <schnitzeltony@gmail.com> wrote:
>
> On Tue, Aug 28, 2018 at 7:36 PM, Khem Raj <raj.khem@gmail.com> wrote:
> > Hi Andreas
> >
> > On Tue, Aug 28, 2018 at 10:21 AM Andreas Müller <schnitzeltony@gmail.com> wrote:
> >>
> >> On Tue, Aug 28, 2018 at 8:43 AM, Andreas Müller <schnitzeltony@gmail.com> wrote:
> >> > On Tue, Aug 28, 2018 at 12:55 AM, Khem Raj <raj.khem@gmail.com> wrote:
> >> >> On Mon, Aug 27, 2018 at 2:15 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
> >> >>>
> >> >>> On Mon, Aug 20, 2018 at 8:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
> >> >>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> >>> > ---
> >> >>> >  meta/recipes-graphics/cairo/cairo.inc | 3 ++-
> >> >>> >  meta/recipes-graphics/mesa/mesa.inc   | 3 +++
> >> >>> >  2 files changed, 5 insertions(+), 1 deletion(-)
> >> >>> >
> >> >>> > diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
> >> >>> > index 20e0d2c92a..7347f223ff 100644
> >> >>> > --- a/meta/recipes-graphics/cairo/cairo.inc
> >> >>> > +++ b/meta/recipes-graphics/cairo/cairo.inc
> >> >>> > @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
> >> >>> >  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
> >> >>> >
> >> >>> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
> >> >>> > -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
> >> >>> > +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
> >> >>> > +           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
> >> >>> >
> >> >>> >  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
> >> >>> >  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
> >> >>> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> >> >>> > index 5afd0db4b7..dd626d9f00 100644
> >> >>> ^ I think this came in accidentaly and it breaks builds when adding
> >> >>> packageconfig glesv2:
> >> >>>
> >> >>> | configure: error: use either --enable-gl=yes or --enable-glesv2=yes.
> >> >>> Not both at the same time.
> >> >>
> >> >> do you remove opengl from DISTRO_FEATURES when enabling glesv2 ?
> >> >> try that out.
> >> >>
> >> >>>
> >> > Yes of course I can. But this patch is wrong - we don't have gles as
> >> > distro feature - and it is not even mentioned in commit message why
> >> > this is done.
> >> >
> >> I am tempted to send a revert for the cairo part:
> >>
> >> * Cross: It changes defaults valid for long time
> >> * Native: As far as I can remember it causes trouble for cairo-native
> >> * It went through without mentioning
> >
> > opengl as a DISTRO_FEATURE should tie into packageconfigs, the
> > situation before this patch was not ideal, people got to work with it.
> >
> > as seen in the example you cited, we can't mix opengl and gles support
> > in packages. other layers have solved your kind of usecase like below
> >
> > https://github.com/WebPlatformForEmbedded/meta-wpe/blob/master/recipes-graphics/cairo/cairo_%.bbappend
> * ^The link is broken

ah see cairo bbappend here
https://github.com/WebPlatformForEmbedded/meta-wpe/tree/master/recipes-graphics/cairo

> * Am quite sure that it breaks cairo-native or dependants (have no
> logs at hand - it is some time ago)
> * Again: I consider this a major change and it was not even
> mentioned/discussed. To me it has nothing to do with 'mesa: Enable
> gallium-llvm on x86 and x86_64' - btw: what does that fix?
>

gallium is for enabling Gallium llvmpipe driver as rasterizer using llvm IR
code generator.

> Let's close discussion here - I think after all these years here I am
> able to find a workaround in case of further issues. Thanks for
> support.
>
> Andreas
Andreas Müller Aug. 28, 2018, 8:51 p.m.
On Tue, Aug 28, 2018 at 10:20 PM, Khem Raj <raj.khem@gmail.com> wrote:
> Hi Andreas
> On Tue, Aug 28, 2018 at 11:28 AM Andreas Müller <schnitzeltony@gmail.com> wrote:
>>
>> On Tue, Aug 28, 2018 at 7:36 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> > Hi Andreas
>> >
>> > On Tue, Aug 28, 2018 at 10:21 AM Andreas Müller <schnitzeltony@gmail.com> wrote:
>> >>
>> >> On Tue, Aug 28, 2018 at 8:43 AM, Andreas Müller <schnitzeltony@gmail.com> wrote:
>> >> > On Tue, Aug 28, 2018 at 12:55 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> >> >> On Mon, Aug 27, 2018 at 2:15 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
>> >> >>>
>> >> >>> On Mon, Aug 20, 2018 at 8:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> >> >>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> >> >>> > ---
>> >> >>> >  meta/recipes-graphics/cairo/cairo.inc | 3 ++-
>> >> >>> >  meta/recipes-graphics/mesa/mesa.inc   | 3 +++
>> >> >>> >  2 files changed, 5 insertions(+), 1 deletion(-)
>> >> >>> >
>> >> >>> > diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
>> >> >>> > index 20e0d2c92a..7347f223ff 100644
>> >> >>> > --- a/meta/recipes-graphics/cairo/cairo.inc
>> >> >>> > +++ b/meta/recipes-graphics/cairo/cairo.inc
>> >> >>> > @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>> >> >>> >  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>> >> >>> >
>> >> >>> >  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
>> >> >>> > -           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
>> >> >>> > +           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
>> >> >>> > +           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
>> >> >>> >
>> >> >>> >  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
>> >> >>> >  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>> >> >>> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
>> >> >>> > index 5afd0db4b7..dd626d9f00 100644
>> >> >>> ^ I think this came in accidentaly and it breaks builds when adding
>> >> >>> packageconfig glesv2:
>> >> >>>
>> >> >>> | configure: error: use either --enable-gl=yes or --enable-glesv2=yes.
>> >> >>> Not both at the same time.
>> >> >>
>> >> >> do you remove opengl from DISTRO_FEATURES when enabling glesv2 ?
>> >> >> try that out.
>> >> >>
>> >> >>>
>> >> > Yes of course I can. But this patch is wrong - we don't have gles as
>> >> > distro feature - and it is not even mentioned in commit message why
>> >> > this is done.
>> >> >
>> >> I am tempted to send a revert for the cairo part:
>> >>
>> >> * Cross: It changes defaults valid for long time
>> >> * Native: As far as I can remember it causes trouble for cairo-native
>> >> * It went through without mentioning
>> >
>> > opengl as a DISTRO_FEATURE should tie into packageconfigs, the
>> > situation before this patch was not ideal, people got to work with it.
>> >
>> > as seen in the example you cited, we can't mix opengl and gles support
>> > in packages. other layers have solved your kind of usecase like below
>> >
>> > https://github.com/WebPlatformForEmbedded/meta-wpe/blob/master/recipes-graphics/cairo/cairo_%.bbappend
>> * ^The link is broken
>
> ah see cairo bbappend here
> https://github.com/WebPlatformForEmbedded/meta-wpe/tree/master/recipes-graphics/cairo
That is more or less the same I am doing in

https://github.com/schnitzeltony/meta-misc/blob/master/appends-packageconfig/oe-core/cairo_%25.bbappend

So meta-wpe will break from now on when used together with a distro
layer enabling opengl in DISTRO_FEATURES - right?

Meanwhile I've checked the native case: It builds fine. To understand why I did:

| bitbake -e cairo | grep ^DISTRO_FEATURES
| <...>
| DISTRO_FEATURES="<...> opengl <...>'
| <...>

and
| bitbake -e cairo-native | grep ^DISTRO_FEATURES
| <...>
DISTRO_FEATURES="ipv6 x11 xattr pulseaudio bluez5
gobject-introspection-data ldconfig"
| <...>

Some magic which I can't find right now, removes opengl from
DISTRO_FEATURES => You patch does not break anything.

Maybe you should send some patch to meta-wpe :)

Andreas