diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc index 525a2d54cd..25cbf631a7 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc +++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://docs/license.html;md5=899fbe7e42d494c7c8c159c7001693d PE = "2" -DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native udev" +DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa" @@ -22,13 +22,12 @@ inherit autotools pkgconfig pythonnative gettext distro_features_check REQUIRED_DISTRO_FEATURES = "opengl" +export LLVM_CONFIG = "${STAGING_BINDIR_CROSS}/llvm-config" EXTRA_OECONF = "--enable-shared-glapi" -PACKAGECONFIG ??= "gbm egl gles dri ${MESA_CRYPTO} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\ +PACKAGECONFIG ??= "gbm egl gles dri \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)} \ " - PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm" X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes" @@ -42,6 +41,10 @@ DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915" PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, dri2proto libdrm" PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, dri3proto presentproto libxshmfence" +# Vulkan drivers need dri3 enabled +# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9 +PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=intel, --without-vulkan-drivers" + PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2" EGL_PLATFORMS = "drm" @@ -49,7 +52,12 @@ EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'x11', ',x11', '', d)}" EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'wayland', ',wayland', '', d)}" PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl" +PACKAGECONFIG[etnaviv] = "" +PACKAGECONFIG[imx] = "" + GALLIUMDRIVERS = "swrast" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'imx', ',imx', '', d)}" GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}" PACKAGECONFIG[r600] = "" GALLIUMDRIVERS_LLVM33_ENABLED = "${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}" @@ -64,11 +72,8 @@ PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm --enable-llvm-shared-libs, export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}" PACKAGECONFIG[xa] = "--enable-xa, --disable-xa" -# Mesa requires one of the following crypto implementation, pick one of them -MESA_CRYPTO ??= "openssl" -PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl" -PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle" -PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt" +OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}" +PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}" # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" @@ -91,9 +96,8 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \ libgles2-mesa libgles2-mesa-dev \ libgles3-mesa libgles3-mesa-dev \ libwayland-egl libwayland-egl-dev \ - libxvmcsoftpipe libxvmcsoftpipe-dev \ libxatracker libxatracker-dev \ - mesa-megadriver \ + mesa-megadriver mesa-vulkan-drivers \ " do_install_append () { @@ -111,7 +115,7 @@ do_install_append () { # they don't get Debian-renamed (which would remove the -mesa suffix), and # RPROVIDEs/RCONFLICTs on the generic libgl name. python __anonymous() { - pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split() + pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() for p in (("egl", "libegl", "libegl1"), ("dri", "libgl", "libgl1"), ("gles", "libgles1", "libglesv1-cm1"), @@ -145,7 +149,7 @@ python mesa_populate_packages() { d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) import re - dri_drivers_root = oe.path.join(d.getVar('PKGD', True), d.getVar('libdir', True), "dri") + dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri") if os.path.isdir(dri_drivers_root): dri_pkgs = os.listdir(dri_drivers_root) lib_name = d.expand("${MLPREFIX}mesa-megadriver") @@ -157,7 +161,7 @@ python mesa_populate_packages() { d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name) d.appendVar("RREPLACES_%s" % lib_name, pkg_name) - pipe_drivers_root = os.path.join(d.getVar('libdir', True), "gallium-pipe") + pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe") do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') } @@ -167,6 +171,7 @@ PACKAGES_DYNAMIC += "^mesa-driver-.*" FILES_${PN} += "${sysconfdir}/drirc" FILES_mesa-megadriver = "${libdir}/dri/*" +FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan" FILES_libegl-mesa = "${libdir}/libEGL.so.*" FILES_libgbm = "${libdir}/libgbm.so.*" FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*" @@ -175,10 +180,9 @@ FILES_libgl-mesa = "${libdir}/libGL.so.*" FILES_libglapi = "${libdir}/libglapi.so.*" FILES_libosmesa = "${libdir}/libOSMesa.so.*" FILES_libwayland-egl = "${libdir}/libwayland-egl.so.*" -FILES_libxvmcsoftpipe = "${libdir}/libXvMCsoftpipe.so.*" FILES_libxatracker = "${libdir}/libxatracker.so.*" -FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc" +FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan" FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" @@ -186,9 +190,8 @@ FILES_libglapi-dev = "${libdir}/libglapi.*" FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" FILES_libgles3-mesa-dev = "${includedir}/GLES3" -FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h ${libdir}/pkgconfig/osmesa.pc" +FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayland-egl.*" -FILES_libxvmcsoftpipe-dev = "${libdir}/libXvMCsoftpipe.so ${libdir}/libXvMCsoftpipe.la" FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ ${libdir}/pkgconfig/xatracker.pc" |