[Bf-blender-cvs] [68f2066] master: Cycles: Make OpenCL folks happy to use __KERNEL_DEBUG__
Sergey Sharybin
noreply at git.blender.org
Sun Oct 5 12:06:30 CEST 2014
Commit: 68f2066602fe9b6461835adccf61f4ed3622829e
Author: Sergey Sharybin
Date: Sun Oct 5 16:00:23 2014 +0600
Branches: master
https://developer.blender.org/rB68f2066602fe9b6461835adccf61f4ed3622829e
Cycles: Make OpenCL folks happy to use __KERNEL_DEBUG__
Quite straightforward change, the only annoying thing is that we can't use
indentation for include directive just because of the way headers inlineing
works for OpenCL.
Might do smarter job in path_source_replace_includes() but don't want to
spend time on this yet.
===================================================================
M intern/cycles/device/device_opencl.cpp
M intern/cycles/kernel/kernel_path.h
===================================================================
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index d950d08..58b2bca 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -102,7 +102,11 @@ static string opencl_kernel_build_options(const string& platform, const string *
if(opencl_kernel_use_debug())
build_options += "-D__KERNEL_OPENCL_DEBUG__ ";
-
+
+#ifdef WITH_CYCLES_DEBUG
+ build_options += "-D__KERNEL_DEBUG__ ";
+#endif
+
return build_options;
}
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 0e07d8a..56339be 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -46,7 +46,7 @@
#include "kernel_path_volume.h"
#ifdef __KERNEL_DEBUG__
-# include "kernel_debug.h"
+#include "kernel_debug.h"
#endif
CCL_NAMESPACE_BEGIN
More information about the Bf-blender-cvs
mailing list