diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-03-16 10:40:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-22 14:47:29 +0000 |
commit | b576cd5d84fc284c2905c2decc1d91be1c6de213 (patch) | |
tree | bae0dee9d4cc6100676d59bc4e9636e6bc298d53 /meta | |
parent | e5c4db30c5fa1b951b8e101d975711c027a06408 (diff) | |
download | poky-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.inc | 20 |
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 | ||
92 | PACKAGECONFIG:append:class-native = "gallium-llvm r600" | ||
93 | |||
92 | # "gbm" requires "opengl" | 94 | # "gbm" requires "opengl" |
93 | PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" | 95 | PACKAGECONFIG[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 |
104 | VULKAN_DRIVERS = "" | 106 | VULKAN_DRIVERS = "" |
105 | VULKAN_DRIVERS:append:x86:class-target = ",intel" | 107 | VULKAN_DRIVERS:append:x86 = ",intel" |
106 | VULKAN_DRIVERS:append:x86-64:class-target = ",intel" | 108 | VULKAN_DRIVERS:append:x86-64 = ",intel" |
109 | # i686 is a 32 bit override for mesa-native | ||
110 | VULKAN_DRIVERS:append:i686 = ",intel" | ||
107 | VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" | 111 | VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" |
108 | VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}" | 112 | VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}" |
109 | PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" | 113 | PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" |
@@ -149,8 +153,10 @@ PACKAGECONFIG[zink] = "" | |||
149 | GALLIUMDRIVERS = "swrast" | 153 | GALLIUMDRIVERS = "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 |
151 | GALLIUMDRIVERS:x86-x32 = "" | 155 | GALLIUMDRIVERS:x86-x32 = "" |
152 | GALLIUMDRIVERS:append:x86:class-target = ",i915,iris,crocus" | 156 | GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus" |
153 | GALLIUMDRIVERS:append:x86-64:class-target = ",i915,iris,crocus" | 157 | GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus" |
158 | # i686 is a 32 bit override for mesa-native | ||
159 | GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus" | ||
154 | 160 | ||
155 | GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" | 161 | GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" |
156 | GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" | 162 | GALLIUMDRIVERS: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 |
163 | GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" | 169 | GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" |
164 | GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}" | 170 | GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}" |
165 | GALLIUMDRIVERS_LLVM:append:x86:class-target = ",svga" | 171 | GALLIUMDRIVERS_LLVM:append:x86 = ",svga" |
166 | GALLIUMDRIVERS_LLVM:append:x86-64:class-target = ",svga" | 172 | GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga" |
173 | # i686 is a 32 bit override for mesa-native | ||
174 | GALLIUMDRIVERS_LLVM:append:i686 = ",svga" | ||
167 | 175 | ||
168 | PACKAGECONFIG[r600] = "" | 176 | PACKAGECONFIG[r600] = "" |
169 | PACKAGECONFIG[virgl] = "" | 177 | PACKAGECONFIG[virgl] = "" |