summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/mesa/mesa.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-graphics/mesa/mesa.bbappend')
-rw-r--r--recipes-graphics/mesa/mesa.bbappend50
1 files changed, 50 insertions, 0 deletions
diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend
new file mode 100644
index 000000000..120561d19
--- /dev/null
+++ b/recipes-graphics/mesa/mesa.bbappend
@@ -0,0 +1,50 @@
1PROVIDES:remove:imxgpu = "virtual/egl"
2PROVIDES:remove:imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2"
3
4FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
5SRC_URI:append:mx93-nxp-bsp = " file://0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch"
6SRC_URI:append:imx-nxp-bsp = " file://0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch"
7
8PACKAGECONFIG:remove:imxgpu = "egl gbm"
9PACKAGECONFIG:remove:imxgpu3d = "gles"
10
11# FIXME: mesa should support 'x11-no-tls' option
12python () {
13 overrides = d.getVar("OVERRIDES").split(":")
14 if "imxgpu2d" not in overrides:
15 return
16
17 x11flag = d.getVarFlag("PACKAGECONFIG", "x11", False)
18 d.setVarFlag("PACKAGECONFIG", "x11", x11flag.replace("--enable-glx-tls", "--enable-glx"))
19}
20
21# Enable Etnaviv and Freedreno support
22PACKAGECONFIG:append:use-mainline-bsp = " gallium etnaviv freedreno"
23
24# For NXP BSP, GPU drivers don't support dri
25PACKAGECONFIG:remove:imxgpu:use-nxp-bsp = "dri"
26
27# mainline/etnaviv:
28RRECOMMENDS:${PN}-megadriver:append:use-mainline-bsp = " libdrm-etnaviv mesa-etnaviv-env"
29
30BACKEND = \
31 "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
32 bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \
33 'fb', d), d)}"
34
35# FIXME: Dirty hack to allow use of Vivante GPU libGL binary
36do_install:append:imxgpu3d () {
37 rm -f ${D}${libdir}/libGL.* \
38 ${D}${includedir}/GL/gl.h \
39 ${D}${includedir}/GL/glcorearb.h \
40 ${D}${includedir}/GL/glext.h \
41 ${D}${includedir}/GL/glx.h \
42 ${D}${includedir}/GL/glxext.h
43 if [ "${BACKEND}" = "x11" ]; then
44 rm -f ${D}${libdir}/pkgconfig/gl.pc
45 fi
46}
47
48do_install:append:imxgpu () {
49 rm -rf ${D}${includedir}/KHR
50}