Re: [OE-core] [PATCH 08/23] mesa: enable native and nativesdk variants

2019-01-15 Thread Alexander Kanavin
On Mon, 14 Jan 2019 at 17:05, Burton, Ross  wrote:
>> -ANY_OF_DISTRO_FEATURES = "opengl vulkan"
>> +ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"
>
>
> Sounds like this means we should be fiddling the native DISTRO_FEATURES 
> instead of making a distro feature check target-only.

The precedents in oe-core seem to use DISTRO_FEATURES only for target
builds and I tend to agree: it's better to have a 'one size fits all'
approach to native packages, both to speed up builds and to reduce
complexity and need to test variants.
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc

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


Re: [OE-core] [PATCH 08/23] mesa: enable native and nativesdk variants

2019-01-14 Thread Burton, Ross
On Mon, 14 Jan 2019 at 15:05, Alexander Kanavin 
wrote:

> -ANY_OF_DISTRO_FEATURES = "opengl vulkan"
> +ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"


Sounds like this means we should be fiddling the native DISTRO_FEATURES
instead of making a distro feature check target-only.

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


[OE-core] [PATCH 08/23] mesa: enable native and nativesdk variants

2019-01-14 Thread Alexander Kanavin
Note that only the most minimal necessary subset of mesa is built;
particularly we don't build any drivers as that is offloaded
to the GL implementation provided by the host.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-graphics/mesa/mesa.inc | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index 0cc0a82de49..37ca5e39c2d 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -26,7 +26,9 @@ PROVIDES = " \
 
 inherit autotools pkgconfig python3native gettext distro_features_check
 
-ANY_OF_DISTRO_FEATURES = "opengl vulkan"
+BBCLASSEXTEND = "native nativesdk"
+
+ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"
 
 PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
@@ -42,11 +44,13 @@ EXTRA_OECONF = "--enable-shared-glapi \
 --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
 --with-platforms='${PLATFORMS}'"
 
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} 
\
-   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl 
egl gles gbm dri', '', d)} \
+PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland 
vulkan', d)} \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl 
egl gles gbm dri gallium', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 
dri3', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 
'dri3', '', d)} \
   "
+PACKAGECONFIG_class-native ?= "gbm dri-native egl"
+PACKAGECONFIG_class-nativesdk ?= "gbm dri-native egl"
 
 # "gbm" requires "dri", "opengl"
 PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
@@ -62,6 +66,8 @@ DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
 DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915"
 # "dri" requires "opengl"
 PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, 
--disable-dri, xorgproto libdrm"
+# On the native builds we use host's dri drivers
+PACKAGECONFIG[dri-native] = "--enable-dri, , xorgproto libdrm"
 PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
 
 # Vulkan drivers need dri3 enabled
-- 
2.17.1

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