diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-28 21:39:14 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-29 14:41:11 +0300 |
commit | 0579eaae1f7afd2e40ad525fe97de7c4be2a9a1e (patch) | |
tree | 64b02d3bc235036aec5a2d1ac8328c7666b54817 /intern/cycles/kernel/split | |
parent | 61db9ee27a442f30248e6bf48468fee5cc999b6b (diff) |
Cycles: Make all #include statements relative to cycles source directory
The idea is to make include statements more explicit and obvious where the
file is coming from, additionally reducing chance of wrong header being
picked up.
For example, it was not obvious whether bvh.h was refferring to builder
or traversal, whenter node.h is a generic graph node or a shader node
and cases like that.
Surely this might look obvious for the active developers, but after some
time of not touching the code it becomes less obvious where file is coming
from.
This was briefly mentioned in T50824 and seems @brecht is fine with such
explicitness, but need to agree with all active developers before committing
this.
Please note that this patch is lacking changes related on GPU/OpenCL
support. This will be solved if/when we all agree this is a good idea to move
forward.
Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner
Reviewed By: lukasstockner97, maiself, nirved, dingto
Subscribers: brecht
Differential Revision: https://developer.blender.org/D2586
Diffstat (limited to 'intern/cycles/kernel/split')
-rw-r--r-- | intern/cycles/kernel/split/kernel_data_init.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/split/kernel_split_common.h | 62 | ||||
-rw-r--r-- | intern/cycles/kernel/split/kernel_split_data.h | 4 |
3 files changed, 35 insertions, 35 deletions
diff --git a/intern/cycles/kernel/split/kernel_data_init.h b/intern/cycles/kernel/split/kernel_data_init.h index ed447049e48..9d3d01fff75 100644 --- a/intern/cycles/kernel/split/kernel_data_init.h +++ b/intern/cycles/kernel/split/kernel_data_init.h @@ -54,7 +54,7 @@ void KERNEL_FUNCTION_FULL_NAME(data_init)( #ifdef __KERNEL_OPENCL__ #define KERNEL_TEX(type, ttype, name) \ ccl_global type *name, -#include "../kernel_textures.h" +#include "kernel/kernel_textures.h" #endif int start_sample, @@ -98,7 +98,7 @@ void KERNEL_FUNCTION_FULL_NAME(data_init)( #ifdef __KERNEL_OPENCL__ #define KERNEL_TEX(type, ttype, name) \ kg->name = name; -#include "../kernel_textures.h" +#include "kernel/kernel_textures.h" #endif int thread_index = ccl_global_id(1) * ccl_global_size(0) + ccl_global_id(0); diff --git a/intern/cycles/kernel/split/kernel_split_common.h b/intern/cycles/kernel/split/kernel_split_common.h index 5c12fe426ac..4303ba0a905 100644 --- a/intern/cycles/kernel/split/kernel_split_common.h +++ b/intern/cycles/kernel/split/kernel_split_common.h @@ -17,61 +17,61 @@ #ifndef __KERNEL_SPLIT_H__ #define __KERNEL_SPLIT_H__ -#include "kernel_math.h" -#include "kernel_types.h" +#include "kernel/kernel_math.h" +#include "kernel/kernel_types.h" -#include "kernel_split_data.h" +#include "kernel/split/kernel_split_data.h" -#include "kernel_globals.h" +#include "kernel/kernel_globals.h" #ifdef __OSL__ -# include "osl_shader.h" +# include "kernel/osl/osl_shader.h" #endif #ifdef __KERNEL_OPENCL__ -# include "kernel_image_opencl.h" +# include "kernel/kernel_image_opencl.h" #endif #ifdef __KERNEL_CPU__ -# include "../kernels/cpu/kernel_cpu_image.h" +# include "kernel/kernels/cpu/kernel_cpu_image.h" #endif -#include "util_atomic.h" +#include "util/util_atomic.h" -#include "kernel_random.h" -#include "kernel_projection.h" -#include "kernel_montecarlo.h" -#include "kernel_differential.h" -#include "kernel_camera.h" +#include "kernel/kernel_random.h" +#include "kernel/kernel_projection.h" +#include "kernel/kernel_montecarlo.h" +#include "kernel/kernel_differential.h" +#include "kernel/kernel_camera.h" -#include "geom/geom.h" -#include "bvh/bvh.h" +#include "kernel/geom/geom.h" +#include "kernel/bvh/bvh.h" -#include "kernel_accumulate.h" -#include "kernel_shader.h" -#include "kernel_light.h" -#include "kernel_passes.h" +#include "kernel/kernel_accumulate.h" +#include "kernel/kernel_shader.h" +#include "kernel/kernel_light.h" +#include "kernel/kernel_passes.h" #ifdef __SUBSURFACE__ -# include "kernel_subsurface.h" +# include "kernel/kernel_subsurface.h" #endif #ifdef __VOLUME__ -# include "kernel_volume.h" +# include "kernel/kernel_volume.h" #endif -#include "kernel_path_state.h" -#include "kernel_shadow.h" -#include "kernel_emission.h" -#include "kernel_path_common.h" -#include "kernel_path_surface.h" -#include "kernel_path_volume.h" -#include "kernel_path_subsurface.h" +#include "kernel/kernel_path_state.h" +#include "kernel/kernel_shadow.h" +#include "kernel/kernel_emission.h" +#include "kernel/kernel_path_common.h" +#include "kernel/kernel_path_surface.h" +#include "kernel/kernel_path_volume.h" +#include "kernel/kernel_path_subsurface.h" #ifdef __KERNEL_DEBUG__ -# include "kernel_debug.h" +# include "kernel/kernel_debug.h" #endif -#include "kernel_queues.h" -#include "kernel_work_stealing.h" +#include "kernel/kernel_queues.h" +#include "kernel/kernel_work_stealing.h" #endif /* __KERNEL_SPLIT_H__ */ diff --git a/intern/cycles/kernel/split/kernel_split_data.h b/intern/cycles/kernel/split/kernel_split_data.h index d319514c190..17e6587883a 100644 --- a/intern/cycles/kernel/split/kernel_split_data.h +++ b/intern/cycles/kernel/split/kernel_split_data.h @@ -17,8 +17,8 @@ #ifndef __KERNEL_SPLIT_DATA_H__ #define __KERNEL_SPLIT_DATA_H__ -#include "kernel_split_data_types.h" -#include "kernel_globals.h" +#include "kernel/split/kernel_split_data_types.h" +#include "kernel/kernel_globals.h" CCL_NAMESPACE_BEGIN |