diff options
author | bartus | 2020-09-02 11:13:44 +0200 |
---|---|---|
committer | bartus | 2020-09-02 11:34:08 +0200 |
commit | c14454752c77b4d4542769028a6f7e7000f1e71d (patch) | |
tree | c9ecc170194f07a11b575fcc49c148f52af92eaa | |
parent | 27c6d01adf525c04c2ef033233e7292889970e03 (diff) | |
download | aur-c14454752c77b4d4542769028a6f7e7000f1e71d.tar.gz |
Merge blender-2.81-git changes
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | .travis.yml | 24 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | cuda11.patch | 64 |
4 files changed, 113 insertions, 28 deletions
@@ -1,8 +1,9 @@ pkgbase = blender-2.82-git pkgdesc = Maintenance version of Blenders blender-v2.82-release branch - pkgver = 2.82.r92824.g375c7dc4caf + pkgver = 2.82.r92825.g53b66eced01 pkgrel = 1 url = https://blender.org/ + changelog = blender.changelog arch = i686 arch = x86_64 license = GPL @@ -44,6 +45,8 @@ pkgbase = blender-2.82-git source = usd_python.patch source = addon_path.patch source = embree.patch + source = cuda11.patch + source = cpp14.patch::https://git.blender.org/gitweb/gitweb.cgi/blender.git/patch/171c4fb238a2a65291540ac5406187bc69f3a6bc sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP @@ -53,6 +56,8 @@ pkgbase = blender-2.82-git sha256sums = 893b127c9e0ea1a67905434f729b45a993c58a7ea954f9f89480ad1cc0578849 sha256sums = 350063cd4f234565bd928a356b4e5f65cf37fc1377904a08bf60f7010c88740b sha256sums = 42afe119529a5350034a489225958112bf4b84bdee38757a932e5caaa9bd5ed4 + sha256sums = 0316d92f180f2fa428a206074bd5adfd30968f9ae5d308efea05e42741dd53fd + sha256sums = 44fad9ac2320d20d21b7aef46f70c05d55697ecde1446513f0a5842014a9d99c pkgname = blender-2.82-git diff --git a/.travis.yml b/.travis.yml index 7ca5332b569f..26eb55c6e1ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -sudo: required language: c branches: @@ -52,27 +51,36 @@ archlinux: # Install optix - 'sudo pacman -U --noconfirm /var/cache/pacman/pkg/optix*.pkg.tar.xz' # Build - - 'echo "Travis initialization time: $travis_uptime seconds"' - "arch_uptime=$(cut -d' ' -f1 /proc/uptime|cut -d'.' -f1)" - - 'echo "Arch-Travis initialization time: $((arch_uptime-travis_uptime)) seconds"' + - 'build_time=$((50*60-arch_uptime-cache_out_time-60))' + - 'echo "Travis initialization time: $(date --date=@${travis_uptime} -u +%M:%S)"' + - 'echo "Arch-Travis initialization time: $(date --date=@$((arch_uptime-travis_uptime)) -u +%M:%S)"' + - 'echo "Current Run time: $(date --date=@${arch_uptime} -u +%M:%S)"' + - 'echo "Assumed Build time: $(date --date=@${build_time} -u +%M:%S)"' + - 'echo "Travis Cache Out time: $(date --date=@${cache_out_time} -u +%M:%S)"' - ccache -s - ccache -z # set timeout to 50m minus current uptime, minus travis cache in time, minus 60 second buffer for arch-travis cleanup. - - timeout $((50*60-arch_uptime-travis_uptime-60)) makepkg -s --noconfirm > >(ts -s '%.T'); _makepkg_return=$? + - timeout ${build_time} makepkg -s --noconfirm > >(ts -s '%.T'); _makepkg_return=$? - sudo pacman -Sc --noconfirm - ccache -s - ccache -z - exit $_makepkg_return script: -- "export travis_uptime=$(cut -d' ' -f1 /proc/uptime|cut -d'.' -f1)" -- 'echo "Travis initialization time: $travis_uptime seconds"' # copy optix.pkg from private github repo - 'git clone https://$GITHUB_ACCESS_TOKEN@github.com/bartoszek/optix-pkg' - 'cp optix-pkg/optix*.pkg.tar.xz ~/.pkg-cache/' +- "export travis_uptime=$(cut -d' ' -f1 /proc/uptime|cut -d'.' -f1)" +- 'echo "Travis initialization time: $travis_uptime seconds"' # assume caching out will take the same amount of time as caching in those making build time equal to 50 minutes minus two time current uptime. # detect no cache in and assume 5min cache out time. -- "[ $travis_uptime -le 60 ] && cache_out_time=300 || cache_out_time=$travis_uptime" -- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/master/arch-travis.sh| timeout $((50*60-travis_uptime-cache_out_time)) bash" +- "[ $travis_uptime -le 200 ] && cache_out_time=450 || cache_out_time=$travis_uptime" +- 'build_time=$((50*60-travis_uptime-cache_out_time))' +- 'echo "Current Run time: $(date --date=@${travis_uptime} -u +%M:%S)"' +- 'echo "Assumed Build time: $(date --date=@${build_time} -u +%M:%S)"' +- 'echo "Cache Out time: $(date --date=@${cache_out_time} -u +%M:%S)"' +- "export cache_out_time" +- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/master/arch-travis.sh| timeout ${build_time} bash" - "echo pacman pkg cache size: $(du -h ~/.pkg-cache|cut -f1) in $(ls ~/.pkg-cache|wc -l) files" #deploy: @@ -23,12 +23,13 @@ _CMAKE_FLAGS+=( -DWITH_ALEMBIC_HDF5=ON ) } ((DISABLE_NINJA)) || makedepends+=('ninja') #shellcheck disable=SC2015 -((DISABLE_CUDA)) && optdepends+=('cuda: CUDA support in Cycles') || { makedepends+=('cuda') ; ((DISABLE_OPTIX)) || makedepends+=('optix>=7.0'); } +((DISABLE_CUDA)) && optdepends+=('cuda: CUDA support in Cycles') || { makedepends+=('cuda') ; ((DISABLE_OPTIX)) || makedepends+=('optix=7.0'); } pkgname=blender-${_blenver}-git -pkgver=2.82.r92824.g375c7dc4caf +pkgver=2.82.r92825.g53b66eced01 pkgrel=1 pkgdesc="Maintenance version of Blenders ${_branch} branch" +changelog=blender.changelog arch=('i686' 'x86_64') url="https://blender.org/" depends+=('alembic' 'libgl' 'python' 'python-numpy' 'openjpeg2' @@ -53,6 +54,8 @@ source=("git://git.blender.org/blender.git${_fragment}" usd_python.patch #add missing python headers when building against python enabled usd. addon_path.patch embree.patch #add missing embree link. + 'cuda11.patch' + 'cpp14.patch::https://git.blender.org/gitweb/gitweb.cgi/blender.git/patch/171c4fb238a2a65291540ac5406187bc69f3a6bc' ) sha256sums=('SKIP' 'SKIP' @@ -62,7 +65,9 @@ sha256sums=('SKIP' '66b9bf3db441f35119ef0eb5f855142f2e773e8002ac0216e056bcc6f8ac409c' '893b127c9e0ea1a67905434f729b45a993c58a7ea954f9f89480ad1cc0578849' '350063cd4f234565bd928a356b4e5f65cf37fc1377904a08bf60f7010c88740b' - '42afe119529a5350034a489225958112bf4b84bdee38757a932e5caaa9bd5ed4') + '42afe119529a5350034a489225958112bf4b84bdee38757a932e5caaa9bd5ed4' + '0316d92f180f2fa428a206074bd5adfd30968f9ae5d308efea05e42741dd53fd' + '44fad9ac2320d20d21b7aef46f70c05d55697ecde1446513f0a5842014a9d99c') pkgver() { blender_version=$(grep -Po "BLENDER_VERSION \K[0-9]{3}" "$srcdir"/blender/source/blender/blenkernel/BKE_blender_version.h) @@ -84,6 +89,8 @@ prepare() { fi ((DISABLE_USD)) || git -C "$srcdir/blender" apply -v "${srcdir}"/usd_python.patch ((DISABLE_EMBREE)) || git -C "$srcdir/blender" apply -v "${srcdir}"/embree.patch + git -C "$srcdir/blender" apply -v "$srcdir/cuda11.patch" + git -C "$srcdir/blender" apply -v "$srcdir/cpp14.patch" } build() { @@ -91,7 +98,7 @@ build() { msg "python version detected: ${_pyver}" # determine whether we can precompile CUDA kernels - _CUDA_PKG=`pacman -Qq cuda 2>/dev/null` || true + _CUDA_PKG=$(pacman -Qq cuda 2>/dev/null) || true if [ "$_CUDA_PKG" != "" ] && ! ((DISABLE_CUDA)) ; then _CMAKE_FLAGS+=( -DWITH_CYCLES_CUDA_BINARIES=ON -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda ) @@ -121,36 +128,37 @@ build() { } package() { + local _suffix=${_blenver}${_suffix:+_$_suffix} export DESTDIR="$pkgdir" if ((DISABLE_NINJA)); then make -C "$srcdir/build" install; else ninja -C "$srcdir/build" install; fi - msg "add -${_blenver} suffix to desktop shortcut" - sed -i "s/=blender/=blender-${_blenver}/g" "${pkgdir}/usr/share/applications/blender.desktop" - sed -i "s/=Blender/=Blender-${_blenver}/g" "${pkgdir}/usr/share/applications/blender.desktop" - mv "${pkgdir}/usr/share/applications/blender.desktop" "${pkgdir}/usr/share/applications/blender-${_blenver}.desktop" + msg "add -${_suffix} suffix to desktop shortcut" + sed -i "s/=blender/=blender-${_suffix}/g" "${pkgdir}/usr/share/applications/blender.desktop" + sed -i "s/=Blender/=Blender-${_suffix}/g" "${pkgdir}/usr/share/applications/blender.desktop" + mv "${pkgdir}/usr/share/applications/blender.desktop" "${pkgdir}/usr/share/applications/blender-${_suffix}.desktop" - msg "add -${_blenver} suffix to binaries" - mv "${pkgdir}/usr/bin/blender" "${pkgdir}/usr/bin/blender-${_blenver}" - mv "${pkgdir}/usr/bin/blender-thumbnailer.py" "${pkgdir}/usr/bin/blender-${_blenver}-thumbnailer.py" + msg "add -${_suffix} suffix to binaries" + mv "${pkgdir}/usr/bin/blender" "${pkgdir}/usr/bin/blender-${_suffix}" + mv "${pkgdir}/usr/bin/blender-thumbnailer.py" "${pkgdir}/usr/bin/blender-${_suffix}-thumbnailer.py" - msg "mv doc/blender to doc/blender-${_blenver}" - mv "${pkgdir}/usr/share/doc/blender" "${pkgdir}/usr/share/doc/blender-${_blenver}" + msg "mv doc/blender to doc/blender-${_suffix}" + mv "${pkgdir}/usr/share/doc/blender" "${pkgdir}/usr/share/doc/blender-${_suffix}" - msg "add -${_blenver} suffix to man page" - mv "${pkgdir}/usr/share/man/man1/blender.1" "${pkgdir}/usr/share/man/man1/blender-${_blenver}.1" + msg "add -${_suffix} suffix to man page" + mv "${pkgdir}/usr/share/man/man1/blender.1" "${pkgdir}/usr/share/man/man1/blender-${_suffix}.1" - msg "add -${_blenver} suffix to all icons" + msg "add -${_suffix} suffix to all icons" while read -r icon do # ${filename##/*.} extra extenssion from path # ${filename%.*} extract filename form path # look at bash "manipulatin string" - mv "$icon" "${icon%.*}-${_blenver}.${icon##/*.}" + mv "$icon" "${icon%.*}-${_suffix}.${icon##/*.}" done < <(find "${pkgdir}/usr/share/icons" -type f) - if [[ -e "$pkgdir/usr/share/blender/${_blenver}${_suffix:+_$_suffix}/scripts/addons/cycles/lib/" ]] ; then + if [[ -e "$pkgdir/usr/share/blender/${_suffix}/scripts/addons/cycles/lib/" ]] ; then # make sure the cuda kernels are not stripped - chmod 444 "$pkgdir"/usr/share/blender/${_blenver}${_suffix:+_$_suffix}/scripts/addons/cycles/lib/* + chmod 444 "$pkgdir"/usr/share/blender/${_suffix}/scripts/addons/cycles/lib/* fi } # vim:set sw=2 ts=2 et: diff --git a/cuda11.patch b/cuda11.patch new file mode 100644 index 000000000000..e06ec9a39a72 --- /dev/null +++ b/cuda11.patch @@ -0,0 +1,64 @@ +From a9644c812fc17b38503828d6edf7d259b6fe0e74 Mon Sep 17 00:00:00 2001 +From: Patrick Mours <pmours@nvidia.com> +Date: Fri, 17 Jul 2020 15:06:55 +0200 +Subject: [PATCH] Cycles: Use pre-compiled PTX kernel for older generation when + no matching one is found + +This patch changes the discovery of pre-compiled kernels, to look for any PTX, even if +it does not match the current architecture version exactly. It works because the driver can +JIT-compile PTX generated for architectures less than or equal to the current one. +This e.g. makes it possible to render on a new GPU architecture even if no pre-compiled +binary kernel was distributed for it as part of the Blender installation. + +Reviewed By: brecht + +Differential Revision: https://developer.blender.org/D8332 +--- + CMakeLists.txt | 2 +- + .../cmake/config/blender_release.cmake | 2 +- + .../cycles/device/cuda/device_cuda_impl.cpp | 23 +++++++++++++++---- + intern/cycles/kernel/CMakeLists.txt | 4 ++-- + 4 files changed, 22 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 49b974596f7..cc0e5a2491f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -367,7 +367,7 @@ option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF) + option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF) + option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF) + mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL) +-set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 CACHE STRING "CUDA architectures to build binaries for") ++set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 compute_75 CACHE STRING "CUDA architectures to build binaries for") + mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH) + unset(PLATFORM_DEFAULT) + option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON) +diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake +index 5fce64ce719..e6fc73a75ed 100644 +--- a/build_files/cmake/config/blender_release.cmake ++++ b/build_files/cmake/config/blender_release.cmake +@@ -53,7 +53,7 @@ set(WITH_USD ON CACHE BOOL "" FORCE) + set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE) + set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE) + set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE) +-set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75 CACHE STRING "" FORCE) ++set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75;compute_75 CACHE STRING "" FORCE) + set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE) + + # platform dependent options +diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt +index 782553e405c..6f139c44b6c 100644 +--- a/intern/cycles/kernel/CMakeLists.txt ++++ b/intern/cycles/kernel/CMakeLists.txt +@@ -495,7 +495,7 @@ if(WITH_CYCLES_DEVICE_OPTIX) + -I "${OPTIX_INCLUDE_DIR}" + -I "${CMAKE_CURRENT_SOURCE_DIR}/.." + -I "${CMAKE_CURRENT_SOURCE_DIR}/kernels/cuda" +- -arch=sm_30 ++ -arch=sm_50 + --use_fast_math + -o ${output}) + +-- +2.27.0 + |