diff options
author | Vincent Davis Jr <vince@underview.tech> | 2022-11-25 17:19:52 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-29 13:30:41 +0000 |
commit | a0dcf93bc919757b23a52597eacb1777df4adf24 (patch) | |
tree | f1de55f01c0f5a461fd20e7a9fdcebcd46d77871 /meta | |
parent | 4543d20213e630437685e9ff4964c2e8e1a29216 (diff) | |
download | poky-a0dcf93bc919757b23a52597eacb1777df4adf24.tar.gz |
mesa: enable glvnd support
Allows mesa to be built with glvnd support.
Thus, creates libEGL_mesa.so* and libGLX_mesa.so*
mesa(vendor) libraries meant to coexist with vendor
neutral dispatch libraries from libglvnd.
(From OE-Core rev: 1c0577d66b5c26b9b248797f17d652daf6d9dfd1)
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
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/conf/distro/include/default-providers.inc | 1 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa.inc | 20 |
2 files changed, 15 insertions, 6 deletions
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc index 6defdca12d..3a4e989c1f 100644 --- a/meta/conf/distro/include/default-providers.inc +++ b/meta/conf/distro/include/default-providers.inc | |||
@@ -5,6 +5,7 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" | |||
5 | PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg" | 5 | PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg" |
6 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" | 6 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" |
7 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" | 7 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
8 | PREFERRED_PROVIDER_virtual/libglx ?= "mesa" | ||
8 | PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" | 9 | PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" |
9 | PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" | 10 | PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" |
10 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" | 11 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" |
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 1949fc15a9..115621228a 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc | |||
@@ -32,15 +32,18 @@ UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" | |||
32 | #because we cannot rely on the fact that all apps will use pkgconfig, | 32 | #because we cannot rely on the fact that all apps will use pkgconfig, |
33 | #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER | 33 | #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER |
34 | do_install:append() { | 34 | do_install:append() { |
35 | if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then | 35 | # sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled. |
36 | sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h | 36 | # So, check if EGL/eglplatform.h exists before running sed. |
37 | fi | 37 | if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then |
38 | sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h | ||
39 | fi | ||
38 | } | 40 | } |
39 | 41 | ||
40 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" | 42 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" |
41 | EXTRANATIVEPATH += "chrpath-native" | 43 | EXTRANATIVEPATH += "chrpath-native" |
42 | PROVIDES = " \ | 44 | PROVIDES = " \ |
43 | ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ | 45 | ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ |
46 | ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \ | ||
44 | ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ | 47 | ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ |
45 | ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ | 48 | ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ |
46 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ | 49 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ |
@@ -109,6 +112,7 @@ VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broa | |||
109 | PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" | 112 | PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" |
110 | 113 | ||
111 | PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" | 114 | PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" |
115 | PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd" | ||
112 | 116 | ||
113 | # "gles" requires "opengl" | 117 | # "gles" requires "opengl" |
114 | PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled" | 118 | PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled" |
@@ -199,6 +203,7 @@ RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'lib | |||
199 | PACKAGES =+ "libegl-mesa libegl-mesa-dev \ | 203 | PACKAGES =+ "libegl-mesa libegl-mesa-dev \ |
200 | libosmesa libosmesa-dev \ | 204 | libosmesa libosmesa-dev \ |
201 | libgl-mesa libgl-mesa-dev \ | 205 | libgl-mesa libgl-mesa-dev \ |
206 | libglx-mesa libglx-mesa-dev \ | ||
202 | libglapi libglapi-dev \ | 207 | libglapi libglapi-dev \ |
203 | libgbm libgbm-dev \ | 208 | libgbm libgbm-dev \ |
204 | libgles1-mesa libgles1-mesa-dev \ | 209 | libgles1-mesa libgles1-mesa-dev \ |
@@ -217,7 +222,7 @@ do_install:append () { | |||
217 | rm -f ${D}${libdir}/gallium-pipe/*.la | 222 | rm -f ${D}${libdir}/gallium-pipe/*.la |
218 | rm -f ${D}${libdir}/gbm/*.la | 223 | rm -f ${D}${libdir}/gbm/*.la |
219 | 224 | ||
220 | # it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used | 225 | # it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used |
221 | chrpath --delete ${D}${libdir}/dri/*_dri.so || true | 226 | chrpath --delete ${D}${libdir}/dri/*_dri.so || true |
222 | 227 | ||
223 | # libwayland-egl has been moved to wayland 1.15+ | 228 | # libwayland-egl has been moved to wayland 1.15+ |
@@ -235,6 +240,7 @@ python __anonymous() { | |||
235 | suffix = "-native" | 240 | suffix = "-native" |
236 | for p in (("egl", "libegl", "libegl1"), | 241 | for p in (("egl", "libegl", "libegl1"), |
237 | ("opengl", "libgl", "libgl1"), | 242 | ("opengl", "libgl", "libgl1"), |
243 | ("glvnd", "libglx",), | ||
238 | ("gles", "libgles1", "libglesv1-cm1"), | 244 | ("gles", "libgles1", "libglesv1-cm1"), |
239 | ("gles", "libgles2", "libglesv2-2"), | 245 | ("gles", "libgles2", "libglesv2-2"), |
240 | ("gles", "libgles3",), | 246 | ("gles", "libgles3",), |
@@ -293,20 +299,22 @@ PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native" | |||
293 | FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d" | 299 | FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d" |
294 | FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan" | 300 | FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan" |
295 | FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" | 301 | FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" |
296 | FILES:libegl-mesa = "${libdir}/libEGL.so.*" | 302 | FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d" |
297 | FILES:libgbm = "${libdir}/libgbm.so.*" | 303 | FILES:libgbm = "${libdir}/libgbm.so.*" |
298 | FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" | 304 | FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" |
299 | FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" | 305 | FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" |
300 | FILES:libgl-mesa = "${libdir}/libGL.so.*" | 306 | FILES:libgl-mesa = "${libdir}/libGL.so.*" |
307 | FILES:libglx-mesa = "${libdir}/libGLX*.so.*" | ||
301 | FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd" | 308 | FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd" |
302 | FILES:libglapi = "${libdir}/libglapi.so.*" | 309 | FILES:libglapi = "${libdir}/libglapi.so.*" |
303 | FILES:libosmesa = "${libdir}/libOSMesa.so.*" | 310 | FILES:libosmesa = "${libdir}/libOSMesa.so.*" |
304 | FILES:libxatracker = "${libdir}/libxatracker.so.*" | 311 | FILES:libxatracker = "${libdir}/libxatracker.so.*" |
305 | 312 | ||
306 | FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so" | 313 | FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so" |
307 | FILES:libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" | 314 | FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" |
308 | FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" | 315 | FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" |
309 | FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" | 316 | FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" |
317 | FILES:libglx-mesa-dev = "${libdir}/libGLX*.*" | ||
310 | FILES:libglapi-dev = "${libdir}/libglapi.*" | 318 | FILES:libglapi-dev = "${libdir}/libglapi.*" |
311 | FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" | 319 | FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" |
312 | FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" | 320 | FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" |