mirror of
https://git.yoctoproject.org/poky-contrib
synced 2025-10-14 03:05:35 +08:00
mesa: sort out driver lists
Sort the lists of VUKAN_DRIVERS, GALLIUMDRIVERS and driver-related PACAKGECONFIG entries, making it easier to add new drivers or to find out the correct dependencies for the driver. (From OE-Core rev: 64108679ada885b74fcc6ac49f9e5e983f34e663) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:

committed by
Richard Purdie

parent
c3f66e88e2
commit
c4c27366f5
@@ -73,39 +73,79 @@ def strip_comma(s):
|
||||
# skip all Rust dependencies if we are not building OpenCL"
|
||||
INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}"
|
||||
|
||||
# "egl" requires "opengl"
|
||||
PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
|
||||
|
||||
# "gbm" requires "opengl"
|
||||
PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
|
||||
|
||||
# "gles" requires "opengl"
|
||||
PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled"
|
||||
|
||||
PACKAGECONFIG[glvnd] = "-Dglvnd=enabled, -Dglvnd=disabled, libglvnd"
|
||||
|
||||
PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
|
||||
|
||||
# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG!
|
||||
# Be sure to enable them both for the target and for the native build.
|
||||
PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang"
|
||||
|
||||
X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr xorgproto libxshmfence"
|
||||
# "x11" requires "opengl"
|
||||
PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
|
||||
PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
|
||||
|
||||
# Entries for GPU vendors.
|
||||
# Some of the drivers might have extra dependencies (libclc, gallium-llvm).
|
||||
# Check them in the individual driver settings in VULKAN_DRIVERS and
|
||||
# GALLIUMDRIVERS.
|
||||
PACKAGECONFIG[amd] = ""
|
||||
PACKAGECONFIG[asahi] = ""
|
||||
PACKAGECONFIG[broadcom] = ""
|
||||
PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"
|
||||
PACKAGECONFIG[freedreno] = ""
|
||||
PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
|
||||
PACKAGECONFIG[intel] = ""
|
||||
PACKAGECONFIG[lima] = ""
|
||||
PACKAGECONFIG[nouveau] = ""
|
||||
PACKAGECONFIG[panfrost] = ""
|
||||
PACKAGECONFIG[svga] = ""
|
||||
PACKAGECONFIG[tegra] = ""
|
||||
PACKAGECONFIG[v3d] = ""
|
||||
PACKAGECONFIG[vc4] = ""
|
||||
PACKAGECONFIG[virgl] = ""
|
||||
PACKAGECONFIG[zink] = ""
|
||||
|
||||
VULKAN_DRIVERS = ""
|
||||
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd gallium-llvm', ',amd', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc gallium-llvm', ',asahi', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc gallium-llvm', ',intel', '', d)}"
|
||||
VULKAN_DRIVERS_SWRAST = ",swrast"
|
||||
# Crashes on x32
|
||||
VULKAN_DRIVERS_SWRAST:x86-x32 = ""
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${VULKAN_DRIVERS_SWRAST}', '', d)}"
|
||||
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
|
||||
# keep sorted by the driver name (rather than PKGCONFIG)
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd gallium-llvm', ',amd', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc gallium-llvm', ',asahi', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination-experimental', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc gallium-llvm', ',intel', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${VULKAN_DRIVERS_SWRAST}', '', d)}"
|
||||
VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost libclc', ',panfrost', '', d)}"
|
||||
|
||||
PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
|
||||
PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
|
||||
|
||||
# mesa development and testing tools support, per driver
|
||||
TOOLS = ""
|
||||
TOOLS_DEPS = ""
|
||||
|
||||
# keep sorted by the driver name (rather than PKGCONFIG)
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'asahi', ',asahi', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
|
||||
TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination', '', d)}"
|
||||
|
||||
# dependencies for tools.
|
||||
TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
|
||||
@@ -117,54 +157,37 @@ PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
|
||||
PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
|
||||
PACKAGECONFIG[xmlconfig] = "-Dxmlconfig=enabled, -Dxmlconfig=disabled, expat"
|
||||
|
||||
PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
|
||||
PACKAGECONFIG[glvnd] = "-Dglvnd=enabled, -Dglvnd=disabled, libglvnd"
|
||||
|
||||
# "gles" requires "opengl"
|
||||
PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled"
|
||||
|
||||
# "egl" requires "opengl"
|
||||
PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
|
||||
|
||||
# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG!
|
||||
# Be sure to enable them both for the target and for the native build.
|
||||
PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang"
|
||||
|
||||
PACKAGECONFIG[broadcom] = ""
|
||||
PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"
|
||||
PACKAGECONFIG[freedreno] = ""
|
||||
PACKAGECONFIG[vc4] = ""
|
||||
PACKAGECONFIG[v3d] = ""
|
||||
PACKAGECONFIG[zink] = ""
|
||||
|
||||
GALLIUMDRIVERS = "softpipe"
|
||||
# gallium swrast was found to crash Xorg on startup in x32 qemu
|
||||
GALLIUMDRIVERS:x86-x32 = ""
|
||||
GALLIUMDRIVERS = ""
|
||||
GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe"
|
||||
GALLIUMDRIVERS_SOFTPIPE = ",softpipe"
|
||||
# gallium softpipe and llvmpipe was found to crash Xorg on startup in x32 qemu
|
||||
GALLIUMDRIVERS_LLVMPIPE:x86-x32 = ""
|
||||
GALLIUMDRIVERS_SOFTPIPE:x86-x32 = ""
|
||||
|
||||
# keep sorted by the driver name (rather than PKGCONFIG)
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc gallium-llvm', ',asahi', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel', ',crocus', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel', ',i915', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc gallium-llvm', ',iris', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVMPIPE}', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'nouveau gallium-llvm', ',nouveau', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost libclc', ',panfrost', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd gallium-llvm', ',r300', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',r600', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd gallium-llvm', ',radeonsi', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${GALLIUMDRIVERS_SOFTPIPE}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'svga gallium-llvm', ',svga', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'tegra', ',tegra', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}"
|
||||
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc gallium-llvm', ',asahi', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd gallium-llvm', ',r300', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc gallium-llvm', ',iris', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'nouveau gallium-llvm', ',nouveau', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd gallium-llvm', ',radeonsi', '', d)}"
|
||||
GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe"
|
||||
# llvmpipe crashes on x32
|
||||
GALLIUMDRIVERS_LLVMPIPE:x86-x32 = ""
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVMPIPE}', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'svga gallium-llvm', ',svga', '', d)}"
|
||||
|
||||
PACKAGECONFIG[amd] = ""
|
||||
PACKAGECONFIG[nouveau] = ""
|
||||
PACKAGECONFIG[svga] = ""
|
||||
PACKAGECONFIG[virgl] = ""
|
||||
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',r600', '', d)}"
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
|
||||
PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
|
||||
PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
|
||||
|
||||
MESA_CLC = "system"
|
||||
MESA_CLC:class-native = "enabled"
|
||||
@@ -173,30 +196,10 @@ INSTALL_MESA_CLC:class-native = "true"
|
||||
MESA_NATIVE = "mesa-native"
|
||||
MESA_NATIVE:class-native = ""
|
||||
|
||||
PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
|
||||
PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
|
||||
PACKAGECONFIG[libclc] = "-Dmesa-clc=${MESA_CLC} -Dinstall-mesa-clc=${INSTALL_MESA_CLC} -Dmesa-clc-bundle-headers=enabled,,libclc spirv-tools spirv-llvm-translator ${MESA_NATIVE}"
|
||||
PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
|
||||
PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
|
||||
|
||||
PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
|
||||
|
||||
PACKAGECONFIG[asahi] = ""
|
||||
|
||||
PACKAGECONFIG[intel] = ""
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel', ',i915,crocus', '', d)}"
|
||||
|
||||
PACKAGECONFIG[lima] = ""
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
|
||||
|
||||
PACKAGECONFIG[panfrost] = ""
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost libclc', ',panfrost', '', d)}"
|
||||
|
||||
PACKAGECONFIG[tegra] = ""
|
||||
GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'tegra', ',tegra,nouveau', '', d)}"
|
||||
|
||||
PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
|
||||
|
||||
PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
|
||||
|
||||
PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
|
||||
|
Reference in New Issue
Block a user