mirror of
https://github.com/thead-yocto-mirror/meta-riscv
synced 2026-06-21 08:52:24 +02:00
mesa-pvr: Force VisionFive2 specific config for mesa-pvr fork
For changes, diff agains the initial inclusion of the mesa-pvr.inc file. This patch now introduces simplifications or forced options that might be problematic in general, but required for VisionFive2.
This commit is contained in:
committed by
Khem Raj
parent
235a2c600a
commit
e499180b5a
@@ -10,7 +10,7 @@ HOMEPAGE = "http://mesa3d.org"
|
||||
BUGTRACKER = "https://bugs.freedesktop.org"
|
||||
SECTION = "x11"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10"
|
||||
LIC_FILES_CHKSUM = "file://docs/license.rst;md5=17a4ea65de7a9ab42437f3131e616a7f"
|
||||
|
||||
PE = "2"
|
||||
|
||||
@@ -85,10 +85,9 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
|
||||
file://0068-GL_ARB_geometry_shader4-entry-points.patch \
|
||||
"
|
||||
|
||||
# required by mesa-native on Ubuntu 18.04 with gcc 7.5 when DEBUG_BUILD enabled
|
||||
SRC_URI:append:class-native = " file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch"
|
||||
S = "${WORKDIR}/mesa-${PV}"
|
||||
|
||||
SRC_URI[sha256sum] = "2de11fb74fc5cc671b818e49fe203cea0cd1d8b69756e97cdb06a2f4e78948f9"
|
||||
SRC_URI[sha256sum] = "2c65e6710b419b67456a48beefd0be827b32db416772e0e363d5f7d54dc01787"
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
|
||||
|
||||
@@ -102,9 +101,9 @@ do_install:append() {
|
||||
|
||||
DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native"
|
||||
EXTRANATIVEPATH += "chrpath-native"
|
||||
# note: different to upstream Mesa, here is not PROVIDES for gles2, which conflicts with the way the visionfive2 binary driver is integrated
|
||||
PROVIDES = " \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
|
||||
virtual/mesa \
|
||||
@@ -147,19 +146,17 @@ EXTRA_OEMESON = " \
|
||||
-Dshared-glapi=enabled \
|
||||
-Dglx-read-only-text=true \
|
||||
-Dplatforms='${@",".join("${PLATFORMS}".split())}' \
|
||||
-Ddri-drivers=pvr \
|
||||
-Dgles1=disabled \
|
||||
-Dgles2=disabled \
|
||||
"
|
||||
|
||||
def strip_comma(s):
|
||||
return s.strip(',')
|
||||
|
||||
PACKAGECONFIG = " \
|
||||
gallium \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
|
||||
"
|
||||
# note: this is the exact config as needed and usable for the VisionFive2 board
|
||||
# upstream Mesa provides much more flexibility which is ignored for sake of simplicity
|
||||
PACKAGECONFIG = "gallium x11 wayland opengl egl gbm dri3 "
|
||||
|
||||
# "gbm" requires "opengl"
|
||||
PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
|
||||
@@ -241,8 +238,6 @@ GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '
|
||||
PACKAGECONFIG[panfrost] = ""
|
||||
GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
|
||||
|
||||
PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
|
||||
|
||||
PACKAGECONFIG[osmesa] = "-Dosmesa=true,-Dosmesa=false"
|
||||
|
||||
PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
|
||||
@@ -376,7 +371,7 @@ FILES:libglapi = "${libdir}/libglapi.so.*"
|
||||
FILES:libosmesa = "${libdir}/libOSMesa.so.*"
|
||||
FILES:libxatracker = "${libdir}/libxatracker.so.*"
|
||||
|
||||
FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so"
|
||||
FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so ${datadir}/mesa/wayland-drm.xml ${datadir}/pkgconfig/*"
|
||||
FILES:libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
|
||||
FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
|
||||
FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
|
||||
|
||||
2
recipes-graphics/mesa/mesa-pvr_21.2.1.bb
Normal file
2
recipes-graphics/mesa/mesa-pvr_21.2.1.bb
Normal file
@@ -0,0 +1,2 @@
|
||||
require ${BPN}.inc
|
||||
|
||||
Reference in New Issue
Block a user