summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-01-30 11:59:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-31 23:23:27 +0000
commitec6d61cbddc3b77d1fe7e724acaa5c63aff2d3b7 (patch)
tree4f0b27499ea95b39cc309af25f368ad50a92e201 /meta/recipes-graphics
parentd160e12690c6c1126a26c418816da52c8480fa00 (diff)
downloadpoky-ec6d61cbddc3b77d1fe7e724acaa5c63aff2d3b7.tar.gz
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>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc20
1 files changed, 13 insertions, 7 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index d9e492e94e..e96a12c1b9 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -26,7 +26,9 @@ PROVIDES = " \
26 26
27inherit autotools pkgconfig python3native gettext distro_features_check 27inherit autotools pkgconfig python3native gettext distro_features_check
28 28
29ANY_OF_DISTRO_FEATURES = "opengl vulkan" 29BBCLASSEXTEND = "native nativesdk"
30
31ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"
30 32
31PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \ 33PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
32 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \ 34 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
@@ -42,11 +44,13 @@ EXTRA_OECONF = "--enable-shared-glapi \
42 --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \ 44 --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
43 --with-platforms='${PLATFORMS}'" 45 --with-platforms='${PLATFORMS}'"
44 46
45PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ 47PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
46 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri', '', d)} \ 48 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \
47 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \ 49 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
48 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ 50 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
49 " 51 "
52PACKAGECONFIG_class-native ?= "gbm dri-native egl"
53PACKAGECONFIG_class-nativesdk ?= "gbm dri-native egl"
50 54
51# "gbm" requires "dri", "opengl" 55# "gbm" requires "dri", "opengl"
52PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm" 56PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
@@ -58,17 +62,19 @@ PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
58PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" 62PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
59 63
60DRIDRIVERS = "swrast" 64DRIDRIVERS = "swrast"
61DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915" 65DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915"
62DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915" 66DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915"
63# "dri" requires "opengl" 67# "dri" requires "opengl"
64PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm" 68PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm"
69# On the native builds we use host's dri drivers
70PACKAGECONFIG[dri-native] = "--enable-dri, , xorgproto libdrm"
65PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence" 71PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
66 72
67# Vulkan drivers need dri3 enabled 73# Vulkan drivers need dri3 enabled
68# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9 74# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9
69VULKAN_DRIVERS = "" 75VULKAN_DRIVERS = ""
70VULKAN_DRIVERS_append_x86 = ",intel" 76VULKAN_DRIVERS_append_x86_class-target = ",intel"
71VULKAN_DRIVERS_append_x86-64 = ",intel" 77VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
72PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native" 78PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
73 79
74PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl" 80PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"