# PowerVR Graphics require several patches that have not made their way # upstream yet. This allows us to build the shims we need without completely # clobbering mesa. require recipes-graphics/mesa/mesa.inc SUMMARY += " (with PowerVR support for TI platforms)" LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" BRANCH = "powervr/kirkstone/${PV}" SRC_URI = " \ git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ file://0001-util-format-Check-for-NEON-before-using-it.patch \ file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \ file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \ file://0001-gallium-Fix-build-with-llvm-17.patch \ file://0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch \ " S = "${WORKDIR}/git" PACKAGECONFIG:append = " \ ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \ ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \ " # Temporary work around to use a different SRCREV for SGX Mesa, vs Rogue Mesa # Idea is these two should be the same, but currently a segfault is happening # on certain platforms if the sgx commit is used. SRCREV = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', '7c9522a4147836064f582278e4f7115735c16868', '54fd9d7dea098b6f11c2a244b0c6763dc8c5690c', d)}" PR = "sgxrgx-${SRCREV}" PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss" PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," PACKAGECONFIG:remove = "video-codecs" PACKAGECONFIG[video-codecs] = "" PACKAGECONFIG:remove = "elf-tls" PACKAGECONFIG[elf-tls] = "" PACKAGECONFIG:remove = "xvmc" PACKAGECONFIG[xvmc] = "" PACKAGE_ARCH = "${MACHINE_ARCH}" GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" do_install:append () { # remove pvr custom pkgconfig rm -rf ${D}${datadir}/pkgconfig } FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml" FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so" RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"