[Bf-blender-cvs] [e4b910a] master: Cycles: __KERNEL_DEBUG__ wasn't set for compile-time kernels

Sergey Sharybin noreply at git.blender.org
Sun Oct 5 17:43:07 CEST 2014


Commit: e4b910a0aa159e46053910fe27da6db53bce2900
Author: Sergey Sharybin
Date:   Sun Oct 5 21:42:04 2014 +0600
Branches: master
https://developer.blender.org/rBe4b910a0aa159e46053910fe27da6db53bce2900

Cycles: __KERNEL_DEBUG__ wasn't set for compile-time kernels

===================================================================

M	intern/cycles/kernel/CMakeLists.txt
M	intern/cycles/kernel/SConscript

===================================================================

diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index c5ea3ab..c521e13 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 5a9e57c..c0d969e 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




More information about the Bf-blender-cvs mailing list