diff mbox series

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

Message ID 011962bd47ca60969fa50a3e890adadd6bddc487.1534791421.git.raj.khem@gmail.com
State Accepted
Commit f8270871c34a5f36d3c8f76f528186002b0dc0bd
Headers show
Series Use llvmpile for mesa on x86/x86-64 | expand

Commit Message

Khem Raj Aug. 20, 2018, 6:59 p.m. UTC
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(-)

-- 
2.18.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Andreas Müller Aug. 27, 2018, 9:15 p.m. UTC | #1
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
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Aug. 27, 2018, 10:55 p.m. UTC | #2
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. UTC | #3
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. UTC | #4
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. UTC | #5
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. UTC | #6
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. UTC | #7
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. UTC | #8
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
diff mbox series

Patch

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"