├── .gitignore ├── LICENSE ├── PKGBUILD ├── README.md ├── customization.cfg ├── llvm32.native └── mesa-userpatches └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | !.gitignore 3 | *~ 4 | *.orig 5 | *.log 6 | *.run 7 | *.tgz 8 | *.xz 9 | *.pkg 10 | *.bak 11 | *.tar.gz 12 | *.tar.zst 13 | *.old 14 | *.db 15 | *.files 16 | *.mymesapatch 17 | src/ 18 | pkg/ 19 | mesa-aco/ 20 | mesa/ 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Disclaimer 2 | 3 | Mesa is a 3-D graphics library with an API which is very similar to 4 | that of OpenGL* 5 | To the extent that Mesa utilizes the OpenGL command syntax or state 6 | machine, it is being used with authorization from Silicon Graphics, 7 | Inc.(SGI). However, the author does not possess an OpenGL license 8 | from SGI, and makes no claim that Mesa is in any way a compatible 9 | replacement for OpenGL or associated with SGI. Those who want a 10 | licensed implementation of OpenGL should contact a licensed 11 | vendor. 12 | 13 | Please do not refer to the library as MesaGL (for legal 14 | reasons). It's just Mesa or The Mesa 3-D graphics 15 | library 16 | 17 | * OpenGL is a trademark of Silicon Graphics Incorporated. 18 | 19 | License / Copyright Information 20 | 21 | The Mesa distribution consists of several components. Different copyrights 22 | and licenses apply to different components. For example, GLUT is copyrighted 23 | by Mark Kilgard, some demo programs are copyrighted by SGI, some of the Mesa 24 | device drivers are copyrighted by their authors. See below for a list of 25 | Mesa's main components and the license for each. 26 | 27 | The core Mesa library is licensed according to the terms of the MIT license. 28 | This allows integration with the XFree86, Xorg and DRI projects. 29 | 30 | The default Mesa license is as follows: 31 | 32 | Copyright (C) 1999-2007 Brian Paul All Rights Reserved. 33 | 34 | Permission is hereby granted, free of charge, to any person obtaining a 35 | copy of this software and associated documentation files (the "Software"), 36 | to deal in the Software without restriction, including without limitation 37 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 38 | and/or sell copies of the Software, and to permit persons to whom the 39 | Software is furnished to do so, subject to the following conditions: 40 | 41 | The above copyright notice and this permission notice shall be included 42 | in all copies or substantial portions of the Software. 43 | 44 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 45 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 46 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 47 | BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 48 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 49 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 50 | 51 | Attention, Contributors 52 | 53 | When contributing to the Mesa project you must agree to the licensing terms 54 | of the component to which you're contributing. 55 | The following section lists the primary components of the Mesa distribution 56 | and their respective licenses. 57 | 58 | 59 | Mesa Component Licenses 60 | 61 | Component Location Primary Author License 62 | ---------------------------------------------------------------------------- 63 | Main Mesa code src/mesa/ Brian Paul Mesa (MIT) 64 | 65 | Device drivers src/mesa/drivers/* See drivers See drivers 66 | 67 | Ext headers include/GL/glext.h SGI SGI Free B 68 | include/GL/glxext.h 69 | 70 | GLUT src/glut/ Mark Kilgard Mark's copyright 71 | 72 | Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL 73 | 74 | SGI GLU library src/glu/sgi/ SGI SGI Free B 75 | 76 | demo programs progs/demos/ various see source files 77 | 78 | X demos progs/xdemos/ Brian Paul see source files 79 | 80 | SGI demos progs/samples/ SGI SGI copyright 81 | 82 | RedBook demos progs/redbook/ SGI SGI copyright 83 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Originally based on AUR pkgbuilds from Lone_Wolf - https://aur.archlinux.org/packages/mesa-git/ - https://aur.archlinux.org/packages/lib32-mesa-git/ 2 | # Glitched by: Tk-Glitch 3 | 4 | plain ' .---.` `.---.' 5 | plain ' `/syhhhyso- -osyhhhys/`' 6 | plain ' .syNMdhNNhss/``.---.``/sshNNhdMNys.' 7 | plain ' +sdMh.`+MNsssssssssssssssNM+`.hMds+' 8 | plain ' :syNNdhNNhssssssssssssssshNNhdNNys:' 9 | plain ' /ssyhhhysssssssssssssssssyhhhyss/' 10 | plain ' .ossssssssssssssssssssssssssssso.' 11 | plain ' :sssssssssssssssssssssssssssssssss:' 12 | plain ' /sssssssssssssssssssssssssssssssssss/' 13 | plain ' :sssssssssssssoosssssssoosssssssssssss:' 14 | plain ' osssssssssssssoosssssssoossssssssssssso' 15 | plain ' osssssssssssyyyyhhhhhhhyyyyssssssssssso' 16 | plain ' /yyyyyyhhdmmmmNNNNNNNNNNNmmmmdhhyyyyyy/' 17 | plain ' smmmNNNNNNNNNNNNNNNNNNNNNNNNNNNNNmmms' 18 | plain ' /dNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNd/' 19 | plain ' `:sdNNNNNNNNNNNNNNNNNNNNNNNNNds:`' 20 | plain ' `-+shdNNNNNNNNNNNNNNNdhs+-`' 21 | plain ' `.-:///////:-.`' 22 | 23 | if [ -z "$_where" ]; then 24 | export _where="$PWD" # track basedir as different Arch based distros are moving srcdir around 25 | fi 26 | 27 | source "$_where"/customization.cfg 28 | 29 | # Load external configuration file if present. Available variable values will overwrite customization.cfg ones. 30 | if [ -e "$_where/mesa-userpatches/user.cfg" ]; then 31 | source "$_where/mesa-userpatches/user.cfg" && msg2 "User.cfg config loaded" 32 | elif [ -e "$_EXT_CONFIG_PATH" ]; then 33 | source "$_EXT_CONFIG_PATH" && msg2 "External configuration file $_EXT_CONFIG_PATH will be used to override customization.cfg values.\n" 34 | fi 35 | 36 | pkgname=('mesa-tkg-git') 37 | if [ "$_lib32" == "true" ]; then 38 | pkgname+=('lib32-mesa-tkg-git') 39 | fi 40 | 41 | # custom mesa commit to pass to git 42 | if [ -n "$_mesa_commit" ]; then 43 | _mesa_version="#commit=${_mesa_commit}" 44 | else 45 | _mesa_version="#branch=${_mesa_branch}" 46 | fi 47 | 48 | pkgdesc="an open-source implementation of the OpenGL specification, git version" 49 | pkgver=0 50 | pkgrel=1 51 | arch=('x86_64') 52 | makedepends=('git' 'python-mako' 'python-ply' 'xorgproto' 'libxml2' 'libx11' 'libvdpau' 'libva' 53 | 'elfutils' 'libomxil-bellagio' 'libxrandr' 'ocl-icd' 'libgcrypt' 'wayland' 54 | 'wayland-protocols' 'meson' 'ninja' 'libdrm' 'xorgproto' 'libdrm' 'libxshmfence' 55 | 'libxxf86vm' 'libxdamage' 'libclc' 'libglvnd' 'libunwind' 'lm_sensors' 'libxrandr' 56 | 'valgrind' 'glslang' 'byacc' 'wget' 'flex' 'bison' 'rust' 'rust-bindgen' 'spirv-llvm-translator' 57 | 'cbindgen' 'python-packaging' 'python-yaml') 58 | 59 | if [ "$_lib32" == "true" ]; then 60 | makedepends+=('lib32-libxml2' 'lib32-libx11' 'lib32-libdrm' 'lib32-libxshmfence' 'lib32-libxxf86vm' 61 | 'lib32-gcc-libs' 'lib32-libvdpau' 'lib32-libelf' 'lib32-libgcrypt' 62 | 'lib32-lm_sensors' 'lib32-libxdamage' 'gcc-multilib' 'lib32-libunwind' 'lib32-libglvnd' 63 | 'lib32-libva' 'lib32-wayland' 'lib32-libvdpau' 'lib32-libxrandr' 'lib32-expat' 64 | 'lib32-spirv-llvm-translator' 'lib32-rust-libs') 65 | fi 66 | 67 | depends=('libdrm' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'libelf' 'libomxil-bellagio' 'libunwind' 68 | 'libglvnd' 'wayland' 'lm_sensors' 'libclc' 'glslang' 'zstd' 'vulkan-icd-loader') 69 | if [ "$_lib32" == "true" ]; then 70 | depends+=('lib32-zstd' 'lib32-vulkan-icd-loader') 71 | fi 72 | optdepends=('opengl-man-pages: for the OpenGL API man pages') 73 | 74 | # Use ccache if available 75 | if pacman -Qq ccache &> /dev/null; then 76 | msg2 "ccache was found and will be used\n" 77 | _makepkg_options+=('ccache') 78 | else 79 | msg2 "ccache was not found and will not be used\n" 80 | fi 81 | 82 | if [ "$_no_lto" = "true" ]; then 83 | _makepkg_options+=('!lto') 84 | fi 85 | 86 | if [[ "$_additional_meson_flags" =~ "--buildtype debug" ]]; then 87 | _makepkg_options+=('debug !strip') 88 | fi 89 | 90 | options=(${_makepkg_options[@]}) 91 | 92 | url="https://www.mesa3d.org" 93 | license=('custom') 94 | 95 | _sourceurl="mesa::git+${_mesa_source}${_mesa_version}" 96 | _mesa_srcdir="mesa" 97 | 98 | source=("$_sourceurl" 99 | 'LICENSE' 100 | 'llvm32.native' 101 | ) 102 | md5sums=('SKIP' 103 | '5c65a0fe315dd347e09b1f2826a1df5a' 104 | '6b4a19068a323d7f90a3d3cd315ed1f9') 105 | sha512sums=('SKIP' 106 | '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2' 107 | 'c7dbb390ebde291c517a854fcbe5166c24e95206f768cc9458ca896b2253aabd6df12a7becf831998721b2d622d0c02afdd8d519e77dea8e1d6807b35f0166fe') 108 | 109 | function exit_cleanup { 110 | if [ "$pkgver" != "0" ]; then 111 | sed -i "s/pkgver=$pkgver.*/pkgver=0/g" "$_where"/PKGBUILD 112 | fi 113 | 114 | # Remove temporarily copied patches 115 | sleep 1 # Workarounds a race condition with ninja 116 | rm -rf "$_where"/*.mymesa* 117 | rm -f "$_where"/frogminer 118 | 119 | remove_deps 120 | 121 | msg2 "Cleanup done" 122 | } 123 | 124 | user_patcher() { 125 | # To patch the user because all your base are belong to us 126 | local _patches=("$_where"/*."${_userpatch_ext}revert") 127 | if [ ${#_patches[@]} -ge 2 ] || [ -e "${_patches}" ]; then 128 | if [ "$_user_patches_no_confirm" != "true" ]; then 129 | msg2 "Found ${#_patches[@]} 'to revert' userpatches for ${_userpatch_target}:" 130 | printf '%s\n' "${_patches[@]//*\//}" 131 | read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; 132 | fi 133 | if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then 134 | for _f in "${_patches[@]}"; do 135 | if [ -e "${_f}" ]; then 136 | msg2 "######################################################" 137 | msg2 "" 138 | msg2 "Reverting your own ${_userpatch_target} patch ${_f}" 139 | msg2 "" 140 | msg2 "######################################################" 141 | patch -Np1 -R < "${_f}" 142 | echo "Reverted your own patch ${_f}" >> "$_where"/last_build_config.log 143 | fi 144 | done 145 | fi 146 | fi 147 | 148 | _patches=("$_where"/*."${_userpatch_ext}patch") 149 | if [ ${#_patches[@]} -ge 2 ] || [ -e "${_patches}" ]; then 150 | if [ "$_user_patches_no_confirm" != "true" ]; then 151 | msg2 "Found ${#_patches[@]} userpatches for ${_userpatch_target}:" 152 | printf '%s\n' "${_patches[@]//*\//}" 153 | read -rp "Do you want to install it/them? - Be careful with that ;)"$'\n> N/y : ' _CONDITION; 154 | fi 155 | if [ "$_CONDITION" == "y" ] || [ "$_user_patches_no_confirm" == "true" ]; then 156 | for _f in "${_patches[@]}"; do 157 | if [ -e "${_f}" ]; then 158 | msg2 "######################################################" 159 | msg2 "" 160 | msg2 "Applying your own ${_userpatch_target} patch ${_f}" 161 | msg2 "" 162 | msg2 "######################################################" 163 | patch -Np1 < "${_f}" 164 | echo "Applied your own patch ${_f}" >> "$_where"/last_build_config.log 165 | fi 166 | done 167 | fi 168 | fi 169 | } 170 | 171 | # NINJAFLAGS is an env var used to pass commandline options to ninja 172 | # NOTE: It's your responbility to validate the value of $NINJAFLAGS. If unsure, don't set it. 173 | 174 | # MESA_WHICH_LLVM is an environment variable that determines which llvm package tree is used to built mesa-git against. 175 | # Adding a line to ~/.bashrc that sets this value is the simplest way to ensure a specific choice. 176 | # 177 | # 1: llvm-minimal-git (aur) preferred value 178 | # 2: AUR llvm-git 179 | # 3: llvm-git from LordHeavy unofficial repo 180 | # 4 llvm (stable from extra) Default value 181 | # 182 | 183 | if [[ ! $MESA_WHICH_LLVM ]] && [ ! -e "$_where"/frogminer ]; then 184 | plain "Which llvm package tree do you want to use to build mesa-tkg-git against ?" 185 | read -rp "`echo $' 1.llvm-minimal-git (AUR)\n 2.llvm-git (AUR)\n 3.llvm-git from LordHeavy unofficial repo\n > 4.llvm (default)\n choice[1-4?]: '`" MESA_WHICH_LLVM; 186 | touch "$_where"/frogminer 187 | fi 188 | # double dip 189 | if [ -z "$MESA_WHICH_LLVM" ] || [[ $MESA_WHICH_LLVM -le 0 ]] || [[ $MESA_WHICH_LLVM -ge 5 ]]; then 190 | MESA_WHICH_LLVM=4 191 | fi 192 | 193 | case $MESA_WHICH_LLVM in 194 | 1) 195 | # aur llvm-minimal-git 196 | makedepends+=('llvm-minimal-git') 197 | _llvm='llvm-libs-minimal-git' 198 | if [ "$_lib32" == "true" ]; then 199 | makedepends+=('lib32-llvm-minimal-git') 200 | _lib32_llvm='lib32-llvm-libs-minimal-git' 201 | fi 202 | msg2 "Using llvm-minimal-git (AUR)" 203 | echo "Using llvm-minimal-git (AUR)" >> "$_where"/last_build_config.log 204 | ;; 205 | 2) 206 | # aur llvm-git 207 | # depending on aur-llvm-* to avoid mixup with LH llvm-git 208 | makedepends+=('aur-llvm-git') 209 | _llvm='aur-llvm-libs-git' 210 | if [ "$_lib32" == "true" ]; then 211 | makedepends+=('aur-lib32-llvm-git') 212 | _lib32_llvm='aur-lib32-llvm-libs-git' 213 | fi 214 | msg2 "Using llvm-git (AUR)" 215 | echo "Using llvm-git (AUR)" >> "$_where"/last_build_config.log 216 | ;; 217 | 3) 218 | # mesa-git/llvm-git (lordheavy unofficial repo) 219 | makedepends+=('llvm-git' 'clang-git') 220 | _llvm='llvm-libs-git' 221 | if [ "$_lib32" == "true" ]; then 222 | makedepends+=('lib32-llvm-git') 223 | _lib32_llvm='lib32-llvm-libs-git' 224 | fi 225 | msg2 "Using llvm-git from LordHeavy unofficial repo" 226 | echo "Using llvm-git from LordHeavy unofficial repo" >> "$_where"/last_build_config.log 227 | ;; 228 | 4) 229 | # extra/llvm 230 | makedepends+=('llvm>=8.0.0' 'clang>=8.0.0') 231 | _llvm='llvm-libs>=8.0.0' 232 | if [ "$_lib32" == "true" ]; then 233 | makedepends+=('lib32-llvm>=8.0.0' 'lib32-clang>=8.0.0') 234 | _lib32_llvm='lib32-llvm-libs>=8.0.0' 235 | fi 236 | msg2 "Using llvm (default)" 237 | echo "Using llvm (default)" >> "$_where"/last_build_config.log 238 | ;; 239 | *) 240 | esac 241 | 242 | pkgver() { 243 | cd "$_mesa_srcdir" 244 | _ver=$( cat VERSION ) 245 | echo ${_ver/-/_}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD) 246 | } 247 | 248 | prepare() { 249 | # cleanups 250 | cd "$srcdir/$_mesa_srcdir" 251 | git reset --hard HEAD 252 | git clean -xdf 253 | if [ -n "$_mesa_commit" ]; then 254 | git checkout "${_mesa_commit}" 255 | fi 256 | msg2 "Tree cleaned" 257 | 258 | # copy userpatches inside the PKGBUILD's dir 259 | for _file in "$_where"/mesa-userpatches/*.mymesa* 260 | do 261 | [ -e "$_file" ] && cp "$_file" "$_where" 262 | done 263 | 264 | if [ -n "$_mesa_prs" ]; then 265 | for _pr in ${_mesa_prs[@]}; do 266 | wget -O "$_where"/"$_pr".mymesapatch https://gitlab.freedesktop.org/mesa/mesa/merge_requests/"$_pr".diff 267 | done 268 | fi 269 | 270 | # Community patches 271 | if [ -n "$_community_patches" ]; then 272 | if [ ! -d "$_where/../community-patches" ]; then 273 | cd "$_where/.." && git clone https://github.com/Frogging-Family/community-patches.git && cd "$srcdir"/$_mesa_srcdir 274 | fi 275 | _community_patches=($_community_patches) 276 | for _p in ${_community_patches[@]}; do 277 | ln -s "$_where"/../community-patches/mesa-git/$_p "$_where"/ 278 | done 279 | fi 280 | 281 | # mesa user patches 282 | if [ "$_user_patches" == "true" ]; then 283 | _userpatch_target="mesa" 284 | _userpatch_ext="mymesa" 285 | echo -e "# Last ${pkgname} ${pkgver} configuration - $(date) :\n" > "$_where"/last_build_config.log 286 | echo -e "DRI drivers: ${_dri_drivers}" >> "$_where"/last_build_config.log 287 | echo -e "Gallium drivers: ${_gallium_drivers}" >> "$_where"/last_build_config.log 288 | echo -e "Vulkan drivers: ${_vulkan_drivers}\n" >> "$_where"/last_build_config.log 289 | user_patcher 290 | fi 291 | 292 | # Community/prs patches removal 293 | for _p in ${_community_patches[@]}; do 294 | rm -f "$_where"/$_p 295 | done 296 | for _pr in ${_mesa_prs[@]}; do 297 | rm -f "$_where"/$_pr.mymesapatch 298 | done 299 | 300 | cd "$srcdir" 301 | 302 | # although removing _build folder in build() function feels more natural, 303 | # that interferes with the spirit of makepkg --noextract 304 | if [ -d _build64 ] && [ "$_NUKR" != "false" ]; then 305 | if [[ "$_additional_meson_flags" = *-Db_pgo=use* ]]; then 306 | find ./_build64 -type f ! -name '*.gcda' -delete 307 | else 308 | rm -rf _build64 309 | fi 310 | fi 311 | if [ -d _build32 ] && [ "$_NUKR" != "false" ]; then 312 | if [[ "$_additional_meson_flags" = *-Db_pgo=use* ]]; then 313 | find ./_build32 -type f ! -name '*.gcda' -delete 314 | else 315 | rm -rf _build32 316 | fi 317 | fi 318 | cd "$_where" 319 | } 320 | 321 | build () { 322 | if [ -n "$_custom_opt_flags" ]; then 323 | export CFLAGS="${_custom_opt_flags}" 324 | export CPPFLAGS="${_custom_opt_flags}" 325 | export CXXFLAGS="${_custom_opt_flags}" 326 | fi 327 | if [ "$_no_lto" == "true" ]; then 328 | export _no_lto="-D b_lto=false" 329 | else 330 | export _no_lto="" 331 | fi 332 | 333 | # Selector fixes 334 | 335 | # dri drivers moved to the amber branch 336 | if [ "$_mesa_branch" = "amber" ] || ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor cdde031ac2c8124721655532ee6f4149e20e9c61 HEAD ); then 337 | _dri_inc="-D dri-drivers=${_dri_drivers} " 338 | fi 339 | 340 | # Syntax legacy compat 341 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor 138c003d22739b0d1e6860ed398dd511a44cde04 HEAD ); then 342 | _enabled_="enabled" 343 | _disabled_="disabled" 344 | else 345 | _enabled_="true" 346 | _disabled_="false" 347 | fi 348 | if [ "$_gallium_xa" = "false" ] || [ "$_gallium_xa" = "disabled" ]; then 349 | _gallium_xa="${_disabled_}" 350 | else 351 | _gallium_xa="${_enabled_}" 352 | fi 353 | 354 | # gallium_vdpau requires either r300, r600, radeonsi or nouveau 355 | if [[ $_gallium_drivers != *r300* ]] && [[ $_gallium_drivers != *r600* ]] && [[ $_gallium_drivers != *radeonsi* ]] && [[ $_gallium_drivers != *nouveau* ]]; then 356 | warning "Gallium VDPAU disabled (gallium driver r300, r600, radeonsi or nouveau required)" 357 | _gallium_vdpau="${_disabled_}" 358 | else 359 | _gallium_vdpau="${_enabled_}" 360 | fi 361 | 362 | # gallium_va requires either r600, radeonsi or nouveau 363 | if [[ $_gallium_drivers != *r600* ]] && [[ $_gallium_drivers != *radeonsi* ]] && [[ $_gallium_drivers != *nouveau* ]]; then 364 | warning "Gallium VA disabled (gallium driver r600, radeonsi or nouveau required)" 365 | _gallium_va="${_disabled_}" 366 | else 367 | _gallium_va="${_enabled_}" 368 | fi 369 | 370 | # gallium_omx requires either r600, radeonsi or nouveau 371 | if [[ $_gallium_drivers != *r600* ]] && [[ $_gallium_drivers != *radeonsi* ]] && [[ $_gallium_drivers != *nouveau* ]]; then 372 | warning "Gallium OMX disabled (gallium driver r600, radeonsi or nouveau required)" 373 | _gallium_omx="${_disabled_}" 374 | else 375 | _gallium_omx="bellagio" 376 | fi 377 | 378 | # legacy compat 379 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor e00adef34a5ce485e2c9216a268ca05e89a5fc98 HEAD ); then 380 | _platforms="x11,wayland" 381 | else 382 | _platforms="x11,wayland,drm,surfaceless" 383 | fi 384 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor e2de00876a7033b6923f912af8d2b0bbd100e113 HEAD ); then 385 | _legacy_switches="-D swr-arches=avx,avx2" 386 | fi 387 | 388 | # microsoft clc 389 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor a5227465c13ae74651a932a82aeae65683f4a063 HEAD ); then 390 | _microsoft_clc="-D microsoft-clc=${_disabled_}" 391 | fi 392 | 393 | # osmesa 394 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 027ccd963b1f8f288bef4224aedcddc1557e4f8a HEAD ); then 395 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor ee802372180a2b4460cc7abb53438e45c6b6f1e4 HEAD ); then 396 | if [ "$_osmesa" != "false" ]; then 397 | _osmesa="-D osmesa=true" 398 | else 399 | _osmesa="-D osmesa=false" 400 | fi 401 | else 402 | _osmesa="-D osmesa=gallium" 403 | fi 404 | fi 405 | 406 | # optional codecs after 7ab05e3 407 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor 7ab05e3c3fe34ea7f8d7345b9229c163e42c3600 HEAD ); then 408 | _optional_codecs="-D video-codecs=${_codecs}" 409 | fi 410 | 411 | # layer selector 412 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor 54fe5b0482df0f066384b274796d4081c2a1968c HEAD ); then 413 | _layers="-D vulkan-layers=device-select,overlay" 414 | else 415 | _layers="-D vulkan-overlay-layer=true -D vulkan-device-select-layer=true" 416 | fi 417 | 418 | # intel_hasvk removal for legacy trees 419 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 50013ca9a57c42114044f593c981bbad8c405cc9 HEAD ); then 420 | _vulkan_drivers=$(echo $_vulkan_drivers | sed "s/,intel_hasvk//g" | tr -s " ") 421 | fi 422 | 423 | # xvmc toggle for legacy trees 424 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 8cc766d8f7eac26b7c029a2fac1bdfdba4776c29 HEAD ); then 425 | _xvmc="-D gallium-xvmc=${_disabled_}" 426 | fi 427 | 428 | # android-libbacktrace was enabled with 6291d4d but only affects android. Let's disable. 429 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor 6291d4d33978f14e59e64a4b66ef92ee891babc3 HEAD ); then 430 | _android_libbacktrace="-D android-libbacktrace=disabled" 431 | fi 432 | 433 | # intel-rt 434 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor 876db9135048be34d84bd74b18411678e15c7c3f HEAD ); then 435 | if [[ ${_vulkan_drivers[*]} =~ "intel" ]]; then 436 | _intel_rt="-D intel-rt=enabled" 437 | else 438 | _intel_rt="-D intel-rt=disabled" 439 | fi 440 | _intel_rt_32="-D intel-rt=disabled" 441 | fi 442 | 443 | # intel-clc cross compile fix 444 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor 28c1053c07c177854520f6283fa665f17618adb5 HEAD ); then 445 | if [[ "$_lib32" == "true" ]]; then 446 | _intel_clc_32="-D intel-clc=system" 447 | # Workaround cross compilation error by using intel_clc binary from _build64 448 | export PATH=$srcdir/_build64/src/intel/compiler:${PATH} 449 | fi 450 | fi 451 | 452 | # omx removal 453 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 9b6c27a320ab4b0fcf1fb16220ae7c3d3f06f7df HEAD ); then 454 | _omx="-D gallium-omx=${_gallium_omx}" 455 | _omx_32="-D gallium-omx=${_disabled_}" 456 | fi 457 | 458 | # dri3 removal 459 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 8f6fca89aa1812b03da6d9f7fac3966955abc41e HEAD ); then 460 | _dri3="-D dri3=${_enabled_}" 461 | fi 462 | 463 | # gallium-nine deprecation 464 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 6b6cb825e92ad3bf33b1e032151e32c7b79d8323 HEAD ); then 465 | _galliumnine="-D gallium-nine=true" 466 | fi 467 | 468 | # gallium-xa deprecation 469 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor cf40099730c4af304227c30c891834cec220abff HEAD ); then 470 | _galliumxa="-D gallium-xa=${_gallium_xa}" 471 | fi 472 | 473 | # shared-glapi option removal 474 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor fefb1a6fb3cff1b227e835c2f67accd33fb96b2a HEAD ); then 475 | _sharedglapi="-D shared-glapi=${_enabled_}" 476 | fi 477 | 478 | # gallium-opencl deprecation 479 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 5844dea31620f36c41ac738e17fefd57084b2dbb HEAD ); then 480 | _galliumopencl="-D gallium-opencl=icd" 481 | fi 482 | 483 | # Windows-only feature gallium-mediafoundation needs explicit disabling on Linux because reasons 484 | if ( cd "$srcdir/$_mesa_srcdir" && git merge-base --is-ancestor d348fd5fb5b50edfbdf00f12fd900f77fd658a52 HEAD ); then 485 | _mediafoundation="-D gallium-mediafoundation=disabled" 486 | fi 487 | 488 | # /Selector fixes 489 | 490 | if [ -n "${CUSTOM_GCC_PATH}" ] && [ "$_compiler" != "clang" ]; then 491 | export PATH=$( find "$CUSTOM_GCC_PATH/" -maxdepth 1 -printf "%p:" || ( warning "Custom compiler path seems wrong.." && exit 1 ) )${PATH} 492 | msg2 "CUSTOM_GCC_PATH = ${CUSTOM_GCC_PATH}" 493 | fi 494 | 495 | if [ "$_compiler" = "clang" ]; then 496 | export CC="clang" 497 | export CXX="clang++" 498 | else 499 | export CC="gcc" 500 | export CXX="g++" 501 | fi 502 | 503 | if [ "$_rusticl" = "true" ]; then 504 | _rusticladditions="-D rust_std=2021 -D llvm=enabled" 505 | fi 506 | 507 | arch-meson $_mesa_srcdir _build64 \ 508 | --wrap-mode=nofallback \ 509 | --force-fallback-for=syn,paste,rustc-hash \ 510 | -D b_ndebug=true \ 511 | -D platforms=${_platforms} \ 512 | -D gallium-drivers=${_gallium_drivers} \ 513 | -D vulkan-drivers=${_vulkan_drivers} \ 514 | -D egl=${_enabled_} \ 515 | -D gallium-extra-hud=true \ 516 | -D gallium-rusticl=${_rusticl} \ 517 | -D gallium-va=${_gallium_va} \ 518 | -D gallium-vdpau=${_gallium_vdpau} \ 519 | -D gbm=${_enabled_} \ 520 | -D gles1=${_disabled_} \ 521 | -D gles2=${_enabled_} \ 522 | -D glvnd=${_enabled_} \ 523 | -D glx=dri \ 524 | -D libunwind=${_enabled_} \ 525 | -D llvm=${_enabled_} \ 526 | -D lmsensors=${_enabled_} \ 527 | -D opengl=true \ 528 | -D zstd=auto \ 529 | -D valgrind=${_enabled_} $_legacy_switches $_dri3 $_omx $_dri_inc $_microsoft_clc $_osmesa $_xvmc $_layers $_optional_codecs $_android_libbacktrace $_intel_rt $_galliumnine $_galliumxa $_sharedglapi $_galliumopencl $_mediafoundation $_rusticladditions $_no_lto $_additional_meson_flags $_additional_meson_flags_64 530 | 531 | meson configure _build64 --no-pager 532 | 533 | # quoted from https://www.mesa3d.org/meson.html 534 | # Note: autotools automatically updated translation files (used by the DRI configuration tool) as part of the build process, Meson does not do this. 535 | # Instead, you will need do this: 536 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 2ef983dca61b549a9242afd9008200b231a26e90 HEAD ); then 537 | ninja $NINJAFLAGS -C _build64 xmlpool-pot xmlpool-update-po xmlpool-gmo 538 | fi 539 | # 540 | ninja $NINJAFLAGS -C _build64 541 | 542 | if [ "$_localglesv2pc" == "true" ]; then 543 | echo -e "prefix=/usr\nlibdir=\${prefix}/lib\nincludedir=\${prefix}/include\n\nName: glesv2\nDescription: Mesa OpenGL ES 2.0 library\nVersion: ${pkgver}\nLibs: -L\${libdir} -lGLESv2\nLibs.private: -lpthread -pthread -lm -ldl\nCflags: -I\${includedir}" > "$srcdir"/_build64/glesv2.pc 544 | fi 545 | if [ "$_localeglpc" == "true" ]; then 546 | echo -e "prefix=/usr\nlibdir=\${prefix}/lib\nincludedir=\${prefix}/include\n\nName: egl\nDescription: Mesa EGL Library\nVersion: ${pkgver}\nRequires.private: x11, xext, xdamage >= 1.1, xfixes, x11-xcb, xcb, xcb-glx >= 1.8.1, xcb-dri2 >= 1.8, xxf86vm, libdrm >= 2.4.75\nLibs: -L\${libdir} -lEGL\nLibs.private: -lpthread -pthread -lm -ldl\nCflags: -I\${includedir}" > "$srcdir"/_build64/egl.pc 547 | fi 548 | 549 | if [ "$_lib32" == "true" ]; then 550 | cd "$srcdir" 551 | if [ "$_compiler" = "clang" ]; then 552 | export CC="clang -m32" 553 | export CXX="clang++ -m32" 554 | else 555 | export CC="gcc -m32" 556 | export CXX="g++ -m32" 557 | fi 558 | export PKG_CONFIG=/usr/bin/i686-pc-linux-gnu-pkg-config 559 | export BINDGEN_EXTRA_CLANG_ARGS="--target=i686-unknown-linux-gnu" 560 | 561 | arch-meson $_mesa_srcdir _build32 \ 562 | --cross-file lib32 \ 563 | --native-file llvm32.native \ 564 | --libdir=/usr/lib32 \ 565 | --wrap-mode=nofallback \ 566 | --force-fallback-for=syn,paste,rustc-hash \ 567 | -D b_ndebug=true \ 568 | -D platforms=${_platforms} \ 569 | -D gallium-drivers=${_gallium_drivers} \ 570 | -D vulkan-drivers=${_vulkan_drivers} \ 571 | -D egl=${_enabled_} \ 572 | -D gallium-extra-hud=true \ 573 | -D gallium-rusticl=${_rusticl} \ 574 | -D gallium-va=${_gallium_va} \ 575 | -D gallium-vdpau=${_gallium_vdpau} \ 576 | -D gbm=${_enabled_} \ 577 | -D gles1=${_disabled_} \ 578 | -D gles2=${_enabled_} \ 579 | -D glvnd=${_enabled_} \ 580 | -D glx=dri \ 581 | -D libunwind=${_disabled_} \ 582 | -D llvm=${_enabled_} \ 583 | -D lmsensors=${_enabled_} \ 584 | -D shared-glapi=${_enabled_} \ 585 | -D zstd=auto \ 586 | -D valgrind=${_disabled_} $_legacy_switches $_dri3 $_omx_32 $_dri_inc $_microsoft_clc $_osmesa $_xvmc $_layers $_optional_codecs $_android_libbacktrace $_intel_rt_32 $_intel_clc_32 $_galliumnine $_galliumxa $_sharedglapi $_galliumopencl $_mediafoundation $_rusticladditions $_no_lto $_additional_meson_flags $_additional_meson_flags_32 587 | 588 | meson configure _build32 --no-pager 589 | 590 | # quoted from https://www.mesa3d.org/meson.html 591 | # Note: autotools automatically updated translation files (used by the DRI configuration tool) as part of the build process, Meson does not do this. 592 | # Instead, you will need do this: 593 | if ( cd "$srcdir/$_mesa_srcdir" && ! git merge-base --is-ancestor 2ef983dca61b549a9242afd9008200b231a26e90 HEAD ); then 594 | ninja $NINJAFLAGS -C _build32 xmlpool-pot xmlpool-update-po xmlpool-gmo 595 | fi 596 | # 597 | ninja $NINJAFLAGS -C _build32 598 | 599 | if [ "$_localglesv2pc" == "true" ]; then 600 | echo -e "prefix=/usr\nlibdir=\${prefix}/lib32\nincludedir=\${prefix}/include\n\nName: glesv2\nDescription: Mesa OpenGL ES 2.0 library\nVersion: ${pkgver}\nLibs: -L\${libdir} -lGLESv2\nLibs.private: -lpthread -pthread -lm -ldl\nCflags: -I\${includedir}" > "$srcdir"/_build32/glesv2.pc 601 | fi 602 | if [ "$_localeglpc" == "true" ]; then 603 | echo -e "prefix=/usr\nlibdir=\${prefix}/lib32\nincludedir=\${prefix}/include\n\nName: egl\nDescription: Mesa EGL Library\nVersion: ${pkgver}\nRequires.private: x11, xext, xdamage >= 1.1, xfixes, x11-xcb, xcb, xcb-glx >= 1.8.1, xcb-dri2 >= 1.8, xxf86vm, libdrm >= 2.4.75\nLibs: -L\${libdir} -lEGL\nLibs.private: -lpthread -pthread -lm -ldl\nCflags: -I\${includedir}" > "$srcdir"/_build32/egl.pc 604 | fi 605 | fi 606 | } 607 | 608 | package_mesa-tkg-git() { 609 | depends=('libdrm' 'wayland' 'libxxf86vm' 'libxdamage' 'libxshmfence' 'libelf' 610 | 'libomxil-bellagio' 'libunwind' 'lm_sensors' 'libglvnd' 611 | 'expat' 'libclc' 'libx11' $_llvm 'spirv-tools') 612 | provides=(mesa=$pkgver-$pkgrel vulkan-intel=$pkgver-$pkgrel vulkan-radeon=$pkgver-$pkgrel vulkan-nouveau=$pkgver-$pkgrel vulkan-mesa-layers=$pkgver-$pkgrel mesa-vulkan-layers=$pkgver-$pkgrel libva-mesa-driver=$pkgver-$pkgrel mesa-vdpau=$pkgver-$pkgrel vulkan-driver opencl-mesa=$pkgver-$pkgrel opengl-driver opencl-driver ati-dri intel-dri nouveau-dri svga-dri mesa-dri mesa-libgl vulkan-swrast) 613 | conflicts=('mesa' 'opencl-mesa' 'vulkan-intel' 'vulkan-radeon' 'vulkan-nouveau' 'vulkan-mesa-layers' 'mesa-vulkan-layers' 'libva-mesa-driver' 'mesa-vdpau' 'vulkan-swrast') 614 | 615 | DESTDIR="$pkgdir" ninja $NINJAFLAGS -C _build64 install 616 | 617 | # remove script file from /usr/bin 618 | # https://gitlab.freedesktop.org/mesa/mesa/issues/2230 619 | rm -f "${pkgdir}/usr/bin/mesa-overlay-control.py" 620 | 621 | # indirect rendering 622 | ln -s /usr/lib/libGLX_mesa.so.0 "${pkgdir}/usr/lib/libGLX_indirect.so.0" 623 | 624 | if [ "$_localglesv2pc" == "true" ]; then 625 | # bring back glesv2.pc 626 | install -m644 -Dt "$pkgdir"/usr/lib/pkgconfig "$srcdir"/_build64/glesv2.pc 627 | fi 628 | if [ "$_localeglpc" == "true" ]; then 629 | # bring back egl.pc 630 | install -m644 -Dt "$pkgdir"/usr/lib/pkgconfig "$srcdir"/_build64/egl.pc 631 | fi 632 | 633 | install -Dt "$pkgdir"/usr/share/licenses/$pkgname "$srcdir"/LICENSE 634 | } 635 | 636 | package_lib32-mesa-tkg-git() { 637 | depends=('lib32-libdrm' 'lib32-libxxf86vm' 'lib32-libxdamage' 'lib32-libxshmfence' 638 | 'lib32-lm_sensors' 'lib32-libelf' 'lib32-wayland' 639 | 'lib32-libglvnd' 'lib32-libx11' 'mesa' $_lib32_llvm 'lib32-spirv-tools') 640 | provides=(lib32-mesa=$pkgver-$pkgrel lib32-vulkan-intel=$pkgver-$pkgrel lib32-vulkan-radeon=$pkgver-$pkgrel lib32-vulkan-nouveau=$pkgver-$pkgrel lib32-vulkan-mesa-layers=$pkgver-$pkgrel lib32-mesa-vulkan-layers=$pkgver-$pkgrel lib32-libva-mesa-driver=$pkgver-$pkgrel lib32-mesa-vdpau=$pkgver-$pkgrel lib32-opengl-driver lib32-vulkan-driver lib32-ati-dri lib32-intel-dri lib32-nouveau-dri lib32-mesa-dri lib32-mesa-libgl lib32-vulkan-swrast) 641 | conflicts=('lib32-mesa' 'lib32-vulkan-intel' 'lib32-vulkan-radeon' 'lib32-vulkan-nouveau' 'lib32-vulkan-mesa-layers' 'lib32-mesa-vulkan-layers' 'lib32-libva-mesa-driver' 'lib32-mesa-vdpau' 'lib32-vulkan-swrast') 642 | 643 | DESTDIR="$pkgdir" ninja $NINJAFLAGS -C _build32 install 644 | 645 | # remove files provided by mesa-git 646 | rm -rf "$pkgdir"/etc 647 | rm -rf "$pkgdir"/usr/include 648 | rm -rf "$pkgdir"/usr/share/glvnd/ 649 | rm -rf "$pkgdir"/usr/share/drirc.d/ 650 | rm -rf "$pkgdir"/usr/share/vulkan/explicit_layer.d/ 651 | rm -rf "$pkgdir"/usr/share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json 652 | 653 | # indirect rendering 654 | ln -s /usr/lib32/libGLX_mesa.so.0 "${pkgdir}/usr/lib32/libGLX_indirect.so.0" 655 | 656 | if [ "$_localglesv2pc" == "true" ]; then 657 | # bring back glesv2.pc 658 | install -m644 -Dt "$pkgdir"/usr/lib32/pkgconfig "$srcdir"/_build32/glesv2.pc 659 | fi 660 | if [ "$_localeglpc" == "true" ]; then 661 | # bring back egl.pc 662 | install -m644 -Dt "$pkgdir"/usr/lib32/pkgconfig "$srcdir"/_build32/egl.pc 663 | fi 664 | 665 | install -Dt "$pkgdir"/usr/share/licenses/$pkgname "$srcdir"/LICENSE 666 | } 667 | 668 | trap exit_cleanup EXIT 669 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mesa - The 3D Graphics Library - git version, multilib with userpatches support 2 | 3 | https://gitlab.freedesktop.org/mesa/mesa 4 | 5 | You can customize key features in the `customization.cfg` file such as : 6 | - Selecting which LLVM backend version to use (respecting Lone_Wolf's MESA_WHICH_LLVM variable values) 7 | - Enabling/disabling compilation of the lib32 package 8 | - Change userpatches behaviour 9 | 10 | You can use your own mesa patches by putting them in the mesa-userpatches folder and giving them the .mymesapatch extension. 11 | You can also revert mesa patches by putting them in the mesa-userpatches folder and giving them the .mymesarevert extension. 12 | 13 | Note about Lone_Wolf's MESA_WHICH_LLVM for clean chroot users using an aur helper: Selecting AUR's llvm-git as the LLVM backend in a clean chroot will fail to find the package due to naming. Two workarounds can be used: installing llvm-git beforehand (that will provide the `aur-llvm-git` dependency required), or selecting LordHeavy's llvm-git option instead (that will actually install AUR's llvm-git package unless you have LordHeavy's package installed in your chroot, due to the package names being the same). 14 | 15 | 16 | ``` 17 | git clone https://github.com/Frogging-Family/mesa-git.git 18 | cd mesa-git 19 | makepkg -si 20 | ``` 21 | 22 | -------------------------------------------------------------------------------- /customization.cfg: -------------------------------------------------------------------------------- 1 | # mesa-git-tkg config file 2 | 3 | 4 | #### OPTIONS #### 5 | 6 | # External config file to use - If the given file exists in path, it will override default config (customization.cfg) - Default is ~/.config/frogminer/mesa-git.cfg 7 | _EXT_CONFIG_PATH=~/.config/frogminer/mesa-git.cfg 8 | 9 | # Uncomment the MESA_WHICH_LLVM variable below to select which LLVM package tree to use by default to build mesa-git against. 10 | # Note that if you're used to have that variable set in ~/.bashrc, you can leave it commented out here. It'll be respected by the PKGBUILD. 11 | # Else, you'll get prompted about it at build time. 12 | # 13 | # 1: llvm-minimal-git (AUR) 14 | # 2: llvm-git (AUR) 15 | # 3: llvm-git from LordHeavy unofficial repo 16 | # 4 llvm (stable from extra) Default value 17 | MESA_WHICH_LLVM=4 18 | 19 | # Set to "false" to skip cleanups. Default "true" will enable housecleaning and sanity tasks. 20 | _NUKR="true" 21 | 22 | # Compiler to use - gcc or clang - gcc is default 23 | _compiler="gcc" 24 | 25 | # Custom GCC root dir - Leave empty to use system compilers. 26 | # Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0" 27 | CUSTOM_GCC_PATH="" 28 | 29 | # Enable lib32. 30 | _lib32=true 31 | 32 | # Which Gallium drivers to include in the build - default is "r300,r600,radeonsi,nouveau,svga,llvmpipe,softpipe,virgl,iris,zink,crocus,i915". 33 | # As of mesa commit e2de00876a7033b6923f912af8d2b0bbd100e113, swr (which was part of that default list) was removed. You can add it back if building an older commit. 34 | # For users with a dedicated AMD GPU (RX 400 series and newer) the minimum required to get a working display driver is the "radeonsi,svga,llvmpipe" combo 35 | # If you experience build issues, try removing i915 to disable support for Gen 3 Intel hardware (GMA 950, GMA 3150, etc) 36 | _gallium_drivers="r300,r600,radeonsi,nouveau,svga,llvmpipe,softpipe,virgl,iris,zink,crocus,i915" 37 | 38 | # Which patent encumbered codecs to build support for - default is "vc1dec,h264dec,h264enc,h265dec,h265enc,av1dec,av1enc,vp9dec" (all of them) 39 | # This is used for all video APIs (vaapi, vdpau, vulkan). 40 | # Below 7b22dd8bfdc380be2e4037c1207fcb30a46ad296, you'll want to get rid of av1dec,av1enc,vp9dec as these options are not available 41 | _codecs="vc1dec,h264dec,h264enc,h265dec,h265enc,av1dec,av1enc,vp9dec" 42 | 43 | # Which Vulkan drivers to include in the build - default is "amd,intel,intel_hasvk,swrast,nouveau". 44 | _vulkan_drivers="amd,intel,intel_hasvk,swrast,nouveau" 45 | 46 | # Enable gallium-rusticl - Set to "false" to disable 47 | _rusticl="true" 48 | 49 | # Custom optimization flags - optional. 50 | #_custom_opt_flags="-march=native -O3 -fno-tree-vectorize" 51 | 52 | # Disable `-D b_lto=true` that Arch-meson passes by default - set to "false" to enable LTO. 53 | # Be aware that lto'ing mesa can lead to stability issues. 54 | _no_lto="true" 55 | 56 | # Set optional additional flags for meson - Defaults are "--strip --buildtype release" 57 | # Can be used for PGO'ing (you need to make a first build with "-Db_pgo=generate" added, then launch your apps/games to generate the gcda profiles in your src dir. Once you feel like you have covered all your desired usecases, replace "-Db_pgo=generate" with "-Db_pgo=use" then rebuild the same commit to get your optimized build). 58 | # (coupling with _no_lto="false" is recommended for PGO builds) 59 | # On legacy toolchains you might encounter coverage mismatch errors with "-Db_pgo=use", that you can workaround by adding "-Wno-coverage-mismatch" 60 | _additional_meson_flags="--strip --buildtype release" 61 | # Same as above but only affecting the 64-bit side 62 | _additional_meson_flags_64="" 63 | # Same as above but only affecting the 32-bit side 64 | _additional_meson_flags_32="" 65 | 66 | # Custom Mesa commit to pass to Git. 67 | _mesa_commit="" 68 | 69 | # Mesa branch to pass to Git (when not using a custom commit). Default is "main". 70 | # Older mesa versions were using the master branch (up to May 5th 2021) 71 | _mesa_branch="main" 72 | 73 | # Use pending Mesa merge requests directly as userpatches with their PR ID, separated by space (example: "2421 3151 3273"). 74 | # https://gitlab.freedesktop.org/mesa/mesa/merge_requests 75 | _mesa_prs="" 76 | 77 | # Mesa source to use. Default is "https://gitlab.freedesktop.org/mesa/mesa.git". 78 | # You might want to use the github mirror "https://github.com/mesa3d/mesa.git" if gitlab is slow or unreliable for you, however it might not be in sync with the current HEAD 79 | _mesa_source="https://gitlab.freedesktop.org/mesa/mesa.git" 80 | 81 | #### LEGACY #### 82 | 83 | # Which DRI drivers to include in the build - default is "i915,i965,r100,r200,nouveau" - this doesn't affect the "main" (default) branch 84 | # This option was removed altogether with https://gitlab.freedesktop.org/mesa/mesa/-/commit/59625a68ffc592cc5c6c62baf3a03853f234dbf2 85 | _dri_drivers="i915,i965,r100,r200,nouveau" 86 | 87 | # Use local glesv2.pc - This is provided by libglvnd as of ab9b5fcc3bf90064418f6915cf4259fa11ffe64b. 88 | _localglesv2pc=false 89 | 90 | # Use local egl.pc - This is provided by libglvnd as of ab9b5fcc3bf90064418f6915cf4259fa11ffe64b. 91 | _localeglpc=false 92 | 93 | # Whether to build Gallium XA tracker - set to "false" to disable. 94 | _gallium_xa="false" 95 | 96 | # If you wanted to disable osmesa, uncomment the line below 97 | #_osmesa="false" 98 | 99 | #### USER PATCHES #### 100 | 101 | # Community patches - add patches (separated by a space) of your choice by name from the community-patches dir. 102 | # Example: _community_patches="intel_haswell_vk_workaround.mymesarevert VK_JOSH_depth_bias_info_header.mymesapatch VK_JOSH_depth_bias_info_radv.mymesapatch". 103 | _community_patches="" 104 | 105 | # You can use your own patches by putting them in the same folder as the PKGBUILD and giving them the .mymesapatch extension. 106 | # You can also revert patches by putting them in the same folder as the PKGBUILD and giving them the .mymesarevert extension. 107 | 108 | # Also, userpatches variable below must be set to true for the above to work. 109 | _user_patches="true" 110 | 111 | # Apply all user patches without confirmation - !!! NOT RECOMMENDED !!! 112 | _user_patches_no_confirm="false" 113 | -------------------------------------------------------------------------------- /llvm32.native: -------------------------------------------------------------------------------- 1 | [binaries] 2 | llvm-config = '/usr/bin/llvm-config32' 3 | -------------------------------------------------------------------------------- /mesa-userpatches/README.md: -------------------------------------------------------------------------------- 1 | # mesa-git userpatches 2 | 3 | You can make use of your own patches that aren't available in mesa-git/community-patches by putting them in this folder before running makepkg. 4 | 5 | They need to be diffs against the targeted tree. 6 | 7 | **!! Patches with unrecognized extension will get ignored !!** 8 | 9 | You can use your own mesa patches by giving them the .mymesapatch extension. 10 | 11 | You can also revert mesa patches by giving them the .mymesarevert extension. 12 | --------------------------------------------------------------------------------