summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-03-16 10:40:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-22 14:47:29 +0000
commitb576cd5d84fc284c2905c2decc1d91be1c6de213 (patch)
treebae0dee9d4cc6100676d59bc4e9636e6bc298d53 /meta
parente5c4db30c5fa1b951b8e101d975711c027a06408 (diff)
downloadpoky-b576cd5d84fc284c2905c2decc1d91be1c6de213.tar.gz
mesa: enable a rich set of drivers for native builds
Without this, the only available driver would be swrast (without llvmpipe) which is far too slow to be practical, and so qemu wouldn't be able to perform accelerated graphics. The one major dependency pulled in by this change is llvm-native which takes just under three minutes on my machine. If this is undesitable, opengl can be removed from DISTRO_FEATURES_NATIVE. (From OE-Core rev: 98d5c382e55910870d7e86dc83e3b7c742ea54cd) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc20
1 files changed, 14 insertions, 6 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 775aab9297..dd15046438 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -89,6 +89,8 @@ PACKAGECONFIG = " \
89 ${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'video-codecs', '', d)} \ 89 ${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'video-codecs', '', d)} \
90" 90"
91 91
92PACKAGECONFIG:append:class-native = "gallium-llvm r600"
93
92# "gbm" requires "opengl" 94# "gbm" requires "opengl"
93PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" 95PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
94 96
@@ -102,8 +104,10 @@ PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"
102# Vulkan drivers need dri3 enabled 104# Vulkan drivers need dri3 enabled
103# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9 105# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9
104VULKAN_DRIVERS = "" 106VULKAN_DRIVERS = ""
105VULKAN_DRIVERS:append:x86:class-target = ",intel" 107VULKAN_DRIVERS:append:x86 = ",intel"
106VULKAN_DRIVERS:append:x86-64:class-target = ",intel" 108VULKAN_DRIVERS:append:x86-64 = ",intel"
109# i686 is a 32 bit override for mesa-native
110VULKAN_DRIVERS:append:i686 = ",intel"
107VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" 111VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
108VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}" 112VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
109PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" 113PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
@@ -149,8 +153,10 @@ PACKAGECONFIG[zink] = ""
149GALLIUMDRIVERS = "swrast" 153GALLIUMDRIVERS = "swrast"
150# gallium swrast was found to crash Xorg on startup in x32 qemu 154# gallium swrast was found to crash Xorg on startup in x32 qemu
151GALLIUMDRIVERS:x86-x32 = "" 155GALLIUMDRIVERS:x86-x32 = ""
152GALLIUMDRIVERS:append:x86:class-target = ",i915,iris,crocus" 156GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus"
153GALLIUMDRIVERS:append:x86-64:class-target = ",i915,iris,crocus" 157GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus"
158# i686 is a 32 bit override for mesa-native
159GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus"
154 160
155GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" 161GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
156GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" 162GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
@@ -162,8 +168,10 @@ GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '
162# radeonsi requires LLVM 168# radeonsi requires LLVM
163GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" 169GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
164GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}" 170GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
165GALLIUMDRIVERS_LLVM:append:x86:class-target = ",svga" 171GALLIUMDRIVERS_LLVM:append:x86 = ",svga"
166GALLIUMDRIVERS_LLVM:append:x86-64:class-target = ",svga" 172GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga"
173# i686 is a 32 bit override for mesa-native
174GALLIUMDRIVERS_LLVM:append:i686 = ",svga"
167 175
168PACKAGECONFIG[r600] = "" 176PACKAGECONFIG[r600] = ""
169PACKAGECONFIG[virgl] = "" 177PACKAGECONFIG[virgl] = ""