mesa: enable native and nativesdk variants

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.

(From OE-Core rev: 621e9872ffd680e659d307a19ef5f65ef3bb36d0)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin 2019-01-30 11:59:26 +01:00 committed by Richard Purdie
parent d160e12690
commit ec6d61cbdd

View File

@ -26,7 +26,9 @@ PROVIDES = " \
inherit autotools pkgconfig python3native gettext distro_features_check 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)} \ PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', 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-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
--with-platforms='${PLATFORMS}'" --with-platforms='${PLATFORMS}'"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri', '', 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 opengl', 'x11 dri3', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', '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" # "gbm" requires "dri", "opengl"
PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm" PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
@ -58,17 +62,19 @@ PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
DRIDRIVERS = "swrast" DRIDRIVERS = "swrast"
DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915" DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915"
DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915" DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915"
# "dri" requires "opengl" # "dri" requires "opengl"
PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm" 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" PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
# Vulkan drivers need dri3 enabled # Vulkan drivers need dri3 enabled
# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9 # radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9
VULKAN_DRIVERS = "" VULKAN_DRIVERS = ""
VULKAN_DRIVERS_append_x86 = ",intel" VULKAN_DRIVERS_append_x86_class-target = ",intel"
VULKAN_DRIVERS_append_x86-64 = ",intel" VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native" PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl" PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"