summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2023-02-21 04:21:44 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-24 13:31:45 +0000
commit5e4a8df91e97c4f24a2a9e6edadfe4db2d7b1f70 (patch)
treec8cc74e754f78ff345b24575bd9b2d709a91deee /meta/recipes-graphics/mesa
parentca7306f78a47c58f5f12178dd23a8fb584d6d678 (diff)
downloadpoky-5e4a8df91e97c4f24a2a9e6edadfe4db2d7b1f70.tar.gz
mesa: provide support for packing development and testing tools
Mesa contains several optional tools that can be useful for application and driver developers. Add a packageconfig option to build a mesa-tools package containing relevant programs. Note, the fdperf tool for the freedreno depends on libconfig, which is not a part of oe-core, thus this tool is not built by default by this recipe even when freedreno driver is selected. The fdperf tool needs to be explicitly enabled by adding 'freedreno-fdperf' to the PACKAGECONFIG. (From OE-Core rev: 95eb4008350424f25d08da96bc6d7d56bf4cc161) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc22
1 files changed, 21 insertions, 1 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 0a3dc1dd62..8a8a057c6b 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -107,6 +107,23 @@ VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',fre
107VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}" 107VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
108PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" 108PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
109 109
110# mesa development and testing tools support, per driver
111TOOLS = ""
112TOOLS_DEPS = ""
113TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
114TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
115TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
116TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
117
118# dependencies for tools.
119TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
120
121# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
122# treatment in addition to the usual 'freedreno tools'.
123PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
124
125PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
126
110PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" 127PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
111PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd" 128PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd"
112 129
@@ -211,7 +228,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
211 libopencl-mesa libopencl-mesa-dev \ 228 libopencl-mesa libopencl-mesa-dev \
212 libxatracker libxatracker-dev \ 229 libxatracker libxatracker-dev \
213 mesa-megadriver mesa-vulkan-drivers \ 230 mesa-megadriver mesa-vulkan-drivers \
214 mesa-vdpau-drivers \ 231 mesa-vdpau-drivers mesa-tools \
215 " 232 "
216 233
217do_install:append () { 234do_install:append () {
@@ -323,6 +340,9 @@ FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}
323FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ 340FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
324 ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ 341 ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
325 ${libdir}/pkgconfig/xatracker.pc" 342 ${libdir}/pkgconfig/xatracker.pc"
343# catch all to get all the tools and data
344FILES:${PN}-tools = "${bindir} ${datadir}"
345ALLOW_EMPTY:${PN}-tools = "1"
326 346
327# Fix upgrade path from mesa to mesa-megadriver 347# Fix upgrade path from mesa to mesa-megadriver
328RREPLACES:mesa-megadriver = "mesa" 348RREPLACES:mesa-megadriver = "mesa"