All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] vk-gl-cts: allow the user to specify the target
@ 2021-09-23 15:00 Trevor Woerner
  2021-09-23 15:52 ` [oe] " Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Trevor Woerner @ 2021-09-23 15:00 UTC (permalink / raw)
  To: openembedded-devel

When building opengl-es-cts (for example), allow the user to pick which
target to build instead of hard-coding the 'surfaceless' target.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 .../recipes-graphics/vk-gl-cts/khronos-cts.inc  | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
index f61921473..a9c41f1f7 100644
--- a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
+++ b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
@@ -18,9 +18,9 @@ S = "${WORKDIR}/git"
 
 inherit pkgconfig cmake features_check
 
-REQUIRED_DISTRO_FEATURES += "opengl"
+ANY_OF_DISTRO_FEATURES += "opengl wayland"
 
-DEPENDS += "libpng zlib virtual/libgles2 virtual/egl"
+DEPENDS += "libpng zlib virtual/libgles2"
 
 SRC_URI += "file://0001-Workaround-for-GCC-11-uninit-variable-warnings-946.patch;patchdir=external/amber/src \
             file://0001-Include-limits-header-for-numeric_limits.patch;patchdir=external/vulkancts \
@@ -36,7 +36,18 @@ SRC_URI:append:toolchain-clang = "\
 	file://fix-clang-private-operator.patch \
 "
 
-EXTRA_OECMAKE:append = " -DDEQP_TARGET=surfaceless"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,"
+PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland"
+PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl"
+PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11"
+PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl"
+
+python __anonymous() {
+    packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
+    if len(packageconfig) > 1:
+        bb.fatal("only one PACKAGECONFIG of 'surfaceless wayland x11_egl x11_glx x11_egl_glx' can be specified at a time")
+}
 
 CTSDIR = "/usr/lib/${BPN}"
 
-- 
2.30.0.rc0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-oe][PATCH] vk-gl-cts: allow the user to specify the target
  2021-09-23 15:00 [meta-oe][PATCH] vk-gl-cts: allow the user to specify the target Trevor Woerner
@ 2021-09-23 15:52 ` Khem Raj
  2021-09-23 16:17   ` Trevor Woerner
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2021-09-23 15:52 UTC (permalink / raw)
  To: Trevor Woerner, openembedded-devel



On 9/23/21 8:00 AM, Trevor Woerner wrote:
> When building opengl-es-cts (for example), allow the user to pick which
> target to build instead of hard-coding the 'surfaceless' target.
> 
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
>   .../recipes-graphics/vk-gl-cts/khronos-cts.inc  | 17 ++++++++++++++---
>   1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> index f61921473..a9c41f1f7 100644
> --- a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> +++ b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> @@ -18,9 +18,9 @@ S = "${WORKDIR}/git"
>   
>   inherit pkgconfig cmake features_check
>   
> -REQUIRED_DISTRO_FEATURES += "opengl"
> +ANY_OF_DISTRO_FEATURES += "opengl wayland"
>   
> -DEPENDS += "libpng zlib virtual/libgles2 virtual/egl"
> +DEPENDS += "libpng zlib virtual/libgles2"
>   
>   SRC_URI += "file://0001-Workaround-for-GCC-11-uninit-variable-warnings-946.patch;patchdir=external/amber/src \
>               file://0001-Include-limits-header-for-numeric_limits.patch;patchdir=external/vulkancts \
> @@ -36,7 +36,18 @@ SRC_URI:append:toolchain-clang = "\
>   	file://fix-clang-private-operator.patch \
>   "
>   
> -EXTRA_OECMAKE:append = " -DDEQP_TARGET=surfaceless"
> +PACKAGECONFIG ??= ""
> +PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,"
> +PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland"
> +PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl"
> +PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11"
> +PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl"
> +
> +python __anonymous() {
> +    packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
> +    if len(packageconfig) > 1:
> +        bb.fatal("only one PACKAGECONFIG of 'surfaceless wayland x11_egl x11_glx x11_egl_glx' can be specified at a time")
> +}
>   

Looks an improvement, but there is no default now, so what will happen 
by default, and can be make some intelligent defaults based on 
wayland/x11 distro features etc.

>   CTSDIR = "/usr/lib/${BPN}"
>   
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-oe][PATCH] vk-gl-cts: allow the user to specify the target
  2021-09-23 15:52 ` [oe] " Khem Raj
@ 2021-09-23 16:17   ` Trevor Woerner
  2021-09-23 16:47     ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Trevor Woerner @ 2021-09-23 16:17 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel

On Thu 2021-09-23 @ 08:52:14 AM, Khem Raj wrote:
> 
> 
> On 9/23/21 8:00 AM, Trevor Woerner wrote:
> > When building opengl-es-cts (for example), allow the user to pick which
> > target to build instead of hard-coding the 'surfaceless' target.
> > 
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> >   .../recipes-graphics/vk-gl-cts/khronos-cts.inc  | 17 ++++++++++++++---
> >   1 file changed, 14 insertions(+), 3 deletions(-)
> > 
> > diff --git a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> > index f61921473..a9c41f1f7 100644
> > --- a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> > +++ b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> > @@ -18,9 +18,9 @@ S = "${WORKDIR}/git"
> >   inherit pkgconfig cmake features_check
> > -REQUIRED_DISTRO_FEATURES += "opengl"
> > +ANY_OF_DISTRO_FEATURES += "opengl wayland"
> > -DEPENDS += "libpng zlib virtual/libgles2 virtual/egl"
> > +DEPENDS += "libpng zlib virtual/libgles2"
> >   SRC_URI += "file://0001-Workaround-for-GCC-11-uninit-variable-warnings-946.patch;patchdir=external/amber/src \
> >               file://0001-Include-limits-header-for-numeric_limits.patch;patchdir=external/vulkancts \
> > @@ -36,7 +36,18 @@ SRC_URI:append:toolchain-clang = "\
> >   	file://fix-clang-private-operator.patch \
> >   "
> > -EXTRA_OECMAKE:append = " -DDEQP_TARGET=surfaceless"
> > +PACKAGECONFIG ??= ""

^^ the default is to not specify anything, which picks the "Default" target,
in which case the cmake scripts in the source try to automatically detect
what's in your sysroot and make sensible decisions.

So the best option for users is to not specify anything. But I added
PACKAGECONFIGs in case users want to force an option.

…hmm but then the dependencies won't get handled correctly, unless I either:
1) try to do the detection myself based on IMAGE_FEATURES etc
2) add all dependencies to DEPENDS, although that might confuse the cmake probing

> > +PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,"
> > +PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland"
> > +PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl"
> > +PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11"
> > +PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl"
> > +
> > +python __anonymous() {
> > +    packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
> > +    if len(packageconfig) > 1:
> > +        bb.fatal("only one PACKAGECONFIG of 'surfaceless wayland x11_egl x11_glx x11_egl_glx' can be specified at a time")
> > +}
> 
> Looks an improvement, but there is no default now, so what will happen by
> default, and can be make some intelligent defaults based on wayland/x11
> distro features etc.
> 
> >   CTSDIR = "/usr/lib/${BPN}"
> > 
> > 
> > 
> > 
> > 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [oe] [meta-oe][PATCH] vk-gl-cts: allow the user to specify the target
  2021-09-23 16:17   ` Trevor Woerner
@ 2021-09-23 16:47     ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2021-09-23 16:47 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: openembeded-devel

On Thu, Sep 23, 2021 at 9:17 AM Trevor Woerner <twoerner@gmail.com> wrote:
>
> On Thu 2021-09-23 @ 08:52:14 AM, Khem Raj wrote:
> >
> >
> > On 9/23/21 8:00 AM, Trevor Woerner wrote:
> > > When building opengl-es-cts (for example), allow the user to pick which
> > > target to build instead of hard-coding the 'surfaceless' target.
> > >
> > > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > > ---
> > >   .../recipes-graphics/vk-gl-cts/khronos-cts.inc  | 17 ++++++++++++++---
> > >   1 file changed, 14 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> > > index f61921473..a9c41f1f7 100644
> > > --- a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> > > +++ b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
> > > @@ -18,9 +18,9 @@ S = "${WORKDIR}/git"
> > >   inherit pkgconfig cmake features_check
> > > -REQUIRED_DISTRO_FEATURES += "opengl"
> > > +ANY_OF_DISTRO_FEATURES += "opengl wayland"
> > > -DEPENDS += "libpng zlib virtual/libgles2 virtual/egl"
> > > +DEPENDS += "libpng zlib virtual/libgles2"
> > >   SRC_URI += "file://0001-Workaround-for-GCC-11-uninit-variable-warnings-946.patch;patchdir=external/amber/src \
> > >               file://0001-Include-limits-header-for-numeric_limits.patch;patchdir=external/vulkancts \
> > > @@ -36,7 +36,18 @@ SRC_URI:append:toolchain-clang = "\
> > >     file://fix-clang-private-operator.patch \
> > >   "
> > > -EXTRA_OECMAKE:append = " -DDEQP_TARGET=surfaceless"
> > > +PACKAGECONFIG ??= ""
>
> ^^ the default is to not specify anything, which picks the "Default" target,
> in which case the cmake scripts in the source try to automatically detect
> what's in your sysroot and make sensible decisions.
>
> So the best option for users is to not specify anything. But I added
> PACKAGECONFIGs in case users want to force an option.
>

Please add this commentary to the recipe as well so users can use it
in right way.

> …hmm but then the dependencies won't get handled correctly, unless I either:
> 1) try to do the detection myself based on IMAGE_FEATURES etc
> 2) add all dependencies to DEPENDS, although that might confuse the cmake probing
>
> > > +PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,"
> > > +PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland"
> > > +PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl"
> > > +PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11"
> > > +PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl"
> > > +
> > > +python __anonymous() {
> > > +    packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
> > > +    if len(packageconfig) > 1:
> > > +        bb.fatal("only one PACKAGECONFIG of 'surfaceless wayland x11_egl x11_glx x11_egl_glx' can be specified at a time")
> > > +}
> >
> > Looks an improvement, but there is no default now, so what will happen by
> > default, and can be make some intelligent defaults based on wayland/x11
> > distro features etc.
> >
> > >   CTSDIR = "/usr/lib/${BPN}"
> > >
> > >
> > >
> > > 
> > >

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-23 16:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 15:00 [meta-oe][PATCH] vk-gl-cts: allow the user to specify the target Trevor Woerner
2021-09-23 15:52 ` [oe] " Khem Raj
2021-09-23 16:17   ` Trevor Woerner
2021-09-23 16:47     ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.