From 68f2066602fe9b6461835adccf61f4ed3622829e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 5 Oct 2014 16:00:23 +0600 Subject: 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. --- intern/cycles/device/device_opencl.cpp | 6 +++++- intern/cycles/kernel/kernel_path.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index d950d084cd4..58b2bcafb82 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 0e07d8a95f8..56339be1ff9 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 -- cgit v1.2.3