[arch-commits] Commit in blender/trunk (PKGBUILD cuda9.patch)
Sven-Hendrik Haase
svenstaro at archlinux.org
Tue Oct 3 02:55:54 UTC 2017
Date: Tuesday, October 3, 2017 @ 02:55:52
Author: svenstaro
Revision: 261350
upgpkg: blender 17:2.79-5
cuda9 rebuild
Added:
blender/trunk/cuda9.patch
Modified:
blender/trunk/PKGBUILD
-------------+
PKGBUILD | 9 +++++++--
cuda9.patch | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-10-03 02:53:43 UTC (rev 261349)
+++ PKGBUILD 2017-10-03 02:55:52 UTC (rev 261350)
@@ -17,7 +17,7 @@
pkgname=blender
pkgver=2.79
#[[ -n $_gitcommit ]] && pkgver=${pkgver}.git1.${_gitcommit}
-pkgrel=4
+pkgrel=5
epoch=17
pkgdesc="A fully integrated 3D graphics creation suite"
arch=('i686' 'x86_64')
@@ -36,7 +36,8 @@
"git://git.blender.org/blender-addons-contrib.git"
"git://git.blender.org/blender-translations.git"
"git://git.blender.org/blender-dev-tools.git"
- "git://git.blender.org/scons.git")
+ "git://git.blender.org/scons.git"
+ cuda9.patch)
if [[ -n $_gittag ]]; then
source+=("${pkgname}-${pkgver}::git://git.blender.org/blender.git#tag=${_gittag}")
elif [[ -n $_gitcommit ]]; then
@@ -47,6 +48,7 @@
'SKIP'
'SKIP'
'SKIP'
+ '88f47cac4cac2977f006c0ce22f84e53'
'SKIP')
prepare() {
@@ -59,11 +61,14 @@
git config submodule."source/tools".url ${srcdir}/blender-dev-tools
git config submodule."scons".url ${srcdir}/scons
git submodule update
+
+ patch -Np1 < "${srcdir}"/cuda9.patch
}
build() {
cd "$srcdir/$pkgname-$pkgver"
+ [[ -d build ]] && rm -rf build
mkdir build && cd build
[[ $CARCH == i686 ]] && BUILDCUDA="OFF" || BUILDCUDA="ON"
Added: cuda9.patch
===================================================================
--- cuda9.patch (rev 0)
+++ cuda9.patch 2017-10-03 02:55:52 UTC (rev 261350)
@@ -0,0 +1,40 @@
+X-Git-Url: https://git.blender.org/gitweb/gitweb.cgi/blender.git/blobdiff_plain/22ecea9e38e708056262f3d98b0d0c6210da75cf..f55735e533601b559d53fd1e2c5297092e844345:/intern/cycles/kernel/CMakeLists.txt
+
+diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
+index b4ca16bdb48..b10dd05cb9b 100644
+--- a/intern/cycles/kernel/CMakeLists.txt
++++ b/intern/cycles/kernel/CMakeLists.txt
+@@ -321,7 +321,7 @@ if(WITH_CYCLES_CUDA_BINARIES)
+ set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}")
+
+ # warn for other versions
+- if(CUDA_VERSION MATCHES "80")
++ if(CUDA_VERSION MATCHES "80" OR CUDA_VERSION MATCHES "90")
+ else()
+ message(WARNING
+ "CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
+@@ -399,13 +399,17 @@ if(WITH_CYCLES_CUDA_BINARIES)
+ endmacro()
+
+ foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
+- # Compile regular kernel
+- CYCLES_CUDA_KERNEL_ADD(${arch} kernel "" "${cuda_sources}" FALSE)
+- CYCLES_CUDA_KERNEL_ADD(${arch} filter "" "${cuda_filter_sources}" FALSE)
+-
+- if(WITH_CYCLES_CUDA_SPLIT_KERNEL_BINARIES)
+- # Compile split kernel
+- CYCLES_CUDA_KERNEL_ADD(${arch} kernel_split "-D__SPLIT__" ${cuda_sources} FALSE)
++ if(CUDA_VERSION MATCHES "90" AND ${arch} MATCHES "sm_2.")
++ message(STATUS "CUDA binaries for ${arch} disabled, not supported by CUDA 9.")
++ else()
++ # Compile regular kernel
++ CYCLES_CUDA_KERNEL_ADD(${arch} kernel "" "${cuda_sources}" FALSE)
++ CYCLES_CUDA_KERNEL_ADD(${arch} filter "" "${cuda_filter_sources}" FALSE)
++
++ if(WITH_CYCLES_CUDA_SPLIT_KERNEL_BINARIES)
++ # Compile split kernel
++ CYCLES_CUDA_KERNEL_ADD(${arch} kernel_split "-D__SPLIT__" ${cuda_sources} FALSE)
++ endif()
+ endif()
+ endforeach()
+
More information about the arch-commits
mailing list