Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-10-05 19:42:04 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-05 19:42:53 +0400
commite4b910a0aa159e46053910fe27da6db53bce2900 (patch)
tree96f62bc6cdbad9e38876683f311bddd74514d4e3 /intern
parentbce5b6b241fdfbc51b604aa65a544b8a924df268 (diff)
Cycles: __KERNEL_DEBUG__ wasn't set for compile-time kernels
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/CMakeLists.txt8
-rw-r--r--intern/cycles/kernel/SConscript3
2 files changed, 11 insertions, 0 deletions
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index c5ea3abc567..c521e1383a4 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -170,6 +170,12 @@ if(WITH_CYCLES_CUDA_BINARIES)
set(cuda_cubin kernel_${arch}.cubin)
endif()
+ if(WITH_CYCLES_DEBUG)
+ set(cuda_debug_flags "-D__KERNEL_DEBUG__")
+ else()
+ set(cuda_debug_flags "")
+ endif()
+
set(cuda_version_flags "-D__KERNEL_CUDA_VERSION__=${CUDA_VERSION}")
set(cuda_math_flags "--use_fast_math")
@@ -185,6 +191,7 @@ if(WITH_CYCLES_CUDA_BINARIES)
${cuda_version_flags}
${cuda_math_flags}
${cuda_extra_flags}
+ ${cuda_debug_flags}
-I${CMAKE_CURRENT_SOURCE_DIR}/../util
-I${CMAKE_CURRENT_SOURCE_DIR}/svm
-DCCL_NAMESPACE_BEGIN=
@@ -197,6 +204,7 @@ if(WITH_CYCLES_CUDA_BINARIES)
list(APPEND cuda_cubins ${cuda_cubin})
unset(cuda_extra_flags)
+ unset(cuda_debug_flags)
endmacro()
foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
diff --git a/intern/cycles/kernel/SConscript b/intern/cycles/kernel/SConscript
index 5a9e57c5342..c0d969e24ae 100644
--- a/intern/cycles/kernel/SConscript
+++ b/intern/cycles/kernel/SConscript
@@ -79,6 +79,9 @@ if env['WITH_BF_CYCLES_CUDA_BINARIES']:
nvcc_flags += " -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC"
nvcc_flags += " -I \"%s\" -I \"%s\" -I \"%s\" -I \"%s\"" % (util_dir, svm_dir, geom_dir, closure_dir)
+ if env['WITH_BF_CYCLES_DEBUG']:
+ nvcc_flags += " -D__KERNEL_DEBUG__"
+
# dependencies
dependencies = ['kernel.cu'] + kernel.Glob('*.h') + kernel.Glob('../util/*.h') + kernel.Glob('svm/*.h') + kernel.Glob('geom/*.h') + kernel.Glob('closure/*.h')
last_cubin_file = None