2015-03-27 10:55:58 +00:00
|
|
|
remove_extra_strict_flags()
|
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(INC
|
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
2017-03-28 18:39:14 +00:00
|
|
|
..
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2012-10-17 04:13:03 +00:00
|
|
|
|
2012-09-20 09:04:43 +00:00
|
|
|
set(INC_SYS
|
2012-10-17 04:13:03 +00:00
|
|
|
|
2012-09-20 09:04:43 +00:00
|
|
|
)
|
2011-11-08 20:27:37 +00:00
|
|
|
|
2017-10-07 12:08:02 +00:00
|
|
|
set(SRC_CPU_KERNELS
|
2015-05-21 12:40:04 +00:00
|
|
|
kernels/cpu/kernel.cpp
|
2017-05-16 19:27:57 +00:00
|
|
|
kernels/cpu/kernel_sse2.cpp
|
|
|
|
kernels/cpu/kernel_sse3.cpp
|
|
|
|
kernels/cpu/kernel_sse41.cpp
|
|
|
|
kernels/cpu/kernel_avx.cpp
|
|
|
|
kernels/cpu/kernel_avx2.cpp
|
2017-02-14 11:20:48 +00:00
|
|
|
kernels/cpu/kernel_split.cpp
|
2017-05-16 19:27:57 +00:00
|
|
|
kernels/cpu/kernel_split_sse2.cpp
|
|
|
|
kernels/cpu/kernel_split_sse3.cpp
|
|
|
|
kernels/cpu/kernel_split_sse41.cpp
|
|
|
|
kernels/cpu/kernel_split_avx.cpp
|
|
|
|
kernels/cpu/kernel_split_avx2.cpp
|
2017-05-07 12:40:58 +00:00
|
|
|
kernels/cpu/filter.cpp
|
2017-05-16 19:27:57 +00:00
|
|
|
kernels/cpu/filter_sse2.cpp
|
|
|
|
kernels/cpu/filter_sse3.cpp
|
|
|
|
kernels/cpu/filter_sse41.cpp
|
|
|
|
kernels/cpu/filter_avx.cpp
|
|
|
|
kernels/cpu/filter_avx2.cpp
|
2017-10-07 12:08:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(SRC_CUDA_KERNELS
|
|
|
|
kernels/cuda/kernel.cu
|
|
|
|
kernels/cuda/kernel_split.cu
|
|
|
|
kernels/cuda/filter.cu
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SRC_OPENCL_KERNELS
|
2015-05-21 12:40:04 +00:00
|
|
|
kernels/opencl/kernel.cl
|
2017-03-04 11:29:01 +00:00
|
|
|
kernels/opencl/kernel_state_buffer_size.cl
|
2017-03-08 16:56:06 +00:00
|
|
|
kernels/opencl/kernel_split.cl
|
2015-05-21 12:40:04 +00:00
|
|
|
kernels/opencl/kernel_data_init.cl
|
2017-03-01 06:05:55 +00:00
|
|
|
kernels/opencl/kernel_path_init.cl
|
2015-05-21 12:40:04 +00:00
|
|
|
kernels/opencl/kernel_queue_enqueue.cl
|
|
|
|
kernels/opencl/kernel_scene_intersect.cl
|
|
|
|
kernels/opencl/kernel_lamp_emission.cl
|
2017-03-08 14:42:26 +00:00
|
|
|
kernels/opencl/kernel_do_volume.cl
|
|
|
|
kernels/opencl/kernel_indirect_background.cl
|
2017-05-03 13:30:45 +00:00
|
|
|
kernels/opencl/kernel_shader_setup.cl
|
|
|
|
kernels/opencl/kernel_shader_sort.cl
|
2015-05-21 12:40:04 +00:00
|
|
|
kernels/opencl/kernel_shader_eval.cl
|
|
|
|
kernels/opencl/kernel_holdout_emission_blurring_pathtermination_ao.cl
|
2017-03-08 14:42:26 +00:00
|
|
|
kernels/opencl/kernel_subsurface_scatter.cl
|
2015-05-21 12:40:04 +00:00
|
|
|
kernels/opencl/kernel_direct_lighting.cl
|
2017-03-08 16:39:40 +00:00
|
|
|
kernels/opencl/kernel_shadow_blocked_ao.cl
|
|
|
|
kernels/opencl/kernel_shadow_blocked_dl.cl
|
2017-05-30 00:40:26 +00:00
|
|
|
kernels/opencl/kernel_enqueue_inactive.cl
|
2015-05-21 12:40:04 +00:00
|
|
|
kernels/opencl/kernel_next_iteration_setup.cl
|
2017-03-08 14:42:26 +00:00
|
|
|
kernels/opencl/kernel_indirect_subsurface.cl
|
|
|
|
kernels/opencl/kernel_buffer_update.cl
|
2017-05-07 12:40:58 +00:00
|
|
|
kernels/opencl/filter.cl
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2016-07-11 10:28:45 +00:00
|
|
|
set(SRC_BVH_HEADERS
|
|
|
|
bvh/bvh.h
|
|
|
|
bvh/bvh_nodes.h
|
2016-07-11 10:31:25 +00:00
|
|
|
bvh/bvh_shadow_all.h
|
2017-10-30 19:25:08 +00:00
|
|
|
bvh/bvh_local.h
|
2016-07-11 10:28:45 +00:00
|
|
|
bvh/bvh_traversal.h
|
2016-09-19 11:00:41 +00:00
|
|
|
bvh/bvh_types.h
|
2016-07-11 10:28:45 +00:00
|
|
|
bvh/bvh_volume.h
|
|
|
|
bvh/bvh_volume_all.h
|
|
|
|
bvh/qbvh_nodes.h
|
2016-07-11 10:31:25 +00:00
|
|
|
bvh/qbvh_shadow_all.h
|
2017-10-30 19:25:08 +00:00
|
|
|
bvh/qbvh_local.h
|
2016-07-11 10:28:45 +00:00
|
|
|
bvh/qbvh_traversal.h
|
|
|
|
bvh/qbvh_volume.h
|
|
|
|
bvh/qbvh_volume_all.h
|
2018-02-14 10:23:30 +00:00
|
|
|
bvh/obvh_nodes.h
|
|
|
|
bvh/obvh_shadow_all.h
|
|
|
|
bvh/obvh_local.h
|
|
|
|
bvh/obvh_traversal.h
|
|
|
|
bvh/obvh_volume.h
|
|
|
|
bvh/obvh_volume_all.h
|
2018-11-07 11:58:12 +00:00
|
|
|
bvh/bvh_embree.h
|
2016-07-11 10:28:45 +00:00
|
|
|
)
|
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(SRC_HEADERS
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
kernel_accumulate.h
|
2014-05-19 12:57:55 +00:00
|
|
|
kernel_bake.h
|
2011-04-27 11:58:34 +00:00
|
|
|
kernel_camera.h
|
2018-06-15 08:06:32 +00:00
|
|
|
kernel_color.h
|
2011-04-27 11:58:34 +00:00
|
|
|
kernel_compat_cpu.h
|
|
|
|
kernel_compat_cuda.h
|
|
|
|
kernel_compat_opencl.h
|
|
|
|
kernel_differential.h
|
|
|
|
kernel_emission.h
|
|
|
|
kernel_film.h
|
|
|
|
kernel_globals.h
|
2018-10-28 09:37:41 +00:00
|
|
|
kernel_id_passes.h
|
2013-06-07 16:06:22 +00:00
|
|
|
kernel_jitter.h
|
2011-04-27 11:58:34 +00:00
|
|
|
kernel_light.h
|
|
|
|
kernel_math.h
|
|
|
|
kernel_montecarlo.h
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
kernel_passes.h
|
2011-04-27 11:58:34 +00:00
|
|
|
kernel_path.h
|
2015-06-15 21:02:42 +00:00
|
|
|
kernel_path_branched.h
|
Cycles: OpenCL kernel split
This commit contains all the work related on the AMD megakernel split work
which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus
some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely
someone else which we're forgetting to mention.
Currently only AMD cards are enabled for the new split kernel, but it is
possible to force split opencl kernel to be used by setting the following
environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1.
Not all the features are supported yet, and that being said no motion blur,
camera blur, SSS and volumetrics for now. Also transparent shadows are
disabled on AMD device because of some compiler bug.
This kernel is also only implements regular path tracing and supporting
branched one will take a bit. Branched path tracing is exposed to the
interface still, which is a bit misleading and will be hidden there soon.
More feature will be enabled once they're ported to the split kernel and
tested.
Neither regular CPU nor CUDA has any difference, they're generating the
same exact code, which means no regressions/improvements there.
Based on the research paper:
https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf
Here's the documentation:
https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit
Design discussion of the patch:
https://developer.blender.org/T44197
Differential Revision: https://developer.blender.org/D1200
2015-05-09 14:34:30 +00:00
|
|
|
kernel_path_common.h
|
2013-09-08 18:59:39 +00:00
|
|
|
kernel_path_state.h
|
2014-04-04 12:35:30 +00:00
|
|
|
kernel_path_surface.h
|
2017-03-08 14:42:26 +00:00
|
|
|
kernel_path_subsurface.h
|
2014-04-04 12:35:30 +00:00
|
|
|
kernel_path_volume.h
|
2018-11-29 01:06:30 +00:00
|
|
|
kernel_profiling.h
|
2012-05-07 20:37:48 +00:00
|
|
|
kernel_projection.h
|
Cycles: OpenCL kernel split
This commit contains all the work related on the AMD megakernel split work
which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus
some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely
someone else which we're forgetting to mention.
Currently only AMD cards are enabled for the new split kernel, but it is
possible to force split opencl kernel to be used by setting the following
environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1.
Not all the features are supported yet, and that being said no motion blur,
camera blur, SSS and volumetrics for now. Also transparent shadows are
disabled on AMD device because of some compiler bug.
This kernel is also only implements regular path tracing and supporting
branched one will take a bit. Branched path tracing is exposed to the
interface still, which is a bit misleading and will be hidden there soon.
More feature will be enabled once they're ported to the split kernel and
tested.
Neither regular CPU nor CUDA has any difference, they're generating the
same exact code, which means no regressions/improvements there.
Based on the research paper:
https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf
Here's the documentation:
https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit
Design discussion of the patch:
https://developer.blender.org/T44197
Differential Revision: https://developer.blender.org/D1200
2015-05-09 14:34:30 +00:00
|
|
|
kernel_queues.h
|
2011-04-27 11:58:34 +00:00
|
|
|
kernel_random.h
|
|
|
|
kernel_shader.h
|
2013-12-28 01:56:53 +00:00
|
|
|
kernel_shadow.h
|
2013-04-01 20:26:52 +00:00
|
|
|
kernel_subsurface.h
|
2011-05-20 12:26:01 +00:00
|
|
|
kernel_textures.h
|
2011-11-08 20:27:37 +00:00
|
|
|
kernel_types.h
|
2013-12-28 15:56:19 +00:00
|
|
|
kernel_volume.h
|
Cycles: OpenCL kernel split
This commit contains all the work related on the AMD megakernel split work
which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus
some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely
someone else which we're forgetting to mention.
Currently only AMD cards are enabled for the new split kernel, but it is
possible to force split opencl kernel to be used by setting the following
environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1.
Not all the features are supported yet, and that being said no motion blur,
camera blur, SSS and volumetrics for now. Also transparent shadows are
disabled on AMD device because of some compiler bug.
This kernel is also only implements regular path tracing and supporting
branched one will take a bit. Branched path tracing is exposed to the
interface still, which is a bit misleading and will be hidden there soon.
More feature will be enabled once they're ported to the split kernel and
tested.
Neither regular CPU nor CUDA has any difference, they're generating the
same exact code, which means no regressions/improvements there.
Based on the research paper:
https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf
Here's the documentation:
https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit
Design discussion of the patch:
https://developer.blender.org/T44197
Differential Revision: https://developer.blender.org/D1200
2015-05-09 14:34:30 +00:00
|
|
|
kernel_work_stealing.h
|
2015-12-30 13:51:35 +00:00
|
|
|
)
|
2015-12-30 12:54:02 +00:00
|
|
|
|
2015-12-30 13:51:35 +00:00
|
|
|
set(SRC_KERNELS_CPU_HEADERS
|
|
|
|
kernel.h
|
2015-12-30 12:54:02 +00:00
|
|
|
kernels/cpu/kernel_cpu.h
|
|
|
|
kernels/cpu/kernel_cpu_impl.h
|
2016-05-20 14:46:49 +00:00
|
|
|
kernels/cpu/kernel_cpu_image.h
|
2017-05-07 12:40:58 +00:00
|
|
|
kernels/cpu/filter_cpu.h
|
|
|
|
kernels/cpu/filter_cpu_impl.h
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2011-05-20 12:26:01 +00:00
|
|
|
|
2017-02-14 10:50:29 +00:00
|
|
|
set(SRC_KERNELS_CUDA_HEADERS
|
|
|
|
kernels/cuda/kernel_config.h
|
2017-10-06 19:47:41 +00:00
|
|
|
kernels/cuda/kernel_cuda_image.h
|
2017-02-14 10:50:29 +00:00
|
|
|
)
|
|
|
|
|
2017-05-11 23:23:49 +00:00
|
|
|
set(SRC_KERNELS_OPENCL_HEADERS
|
|
|
|
kernels/opencl/kernel_split_function.h
|
2017-10-06 19:47:41 +00:00
|
|
|
kernels/opencl/kernel_opencl_image.h
|
2017-05-11 23:23:49 +00:00
|
|
|
)
|
|
|
|
|
2012-10-20 14:08:49 +00:00
|
|
|
set(SRC_CLOSURE_HEADERS
|
2016-07-25 01:03:23 +00:00
|
|
|
closure/alloc.h
|
2012-10-20 12:18:00 +00:00
|
|
|
closure/bsdf.h
|
|
|
|
closure/bsdf_ashikhmin_velvet.h
|
2012-10-20 14:08:49 +00:00
|
|
|
closure/bsdf_diffuse.h
|
2012-12-11 14:39:41 +00:00
|
|
|
closure/bsdf_diffuse_ramp.h
|
2012-10-20 12:18:00 +00:00
|
|
|
closure/bsdf_microfacet.h
|
Cycles: Add multi-scattering, energy-conserving GGX as an option to the Glossy, Anisotropic and Glass BSDFs
This commit adds a new distribution to the Glossy, Anisotropic and Glass BSDFs that implements the
multiple-scattering microfacet model described in the paper "Multiple-Scattering Microfacet BSDFs with the Smith Model".
Essentially, the improvement is that unlike classical GGX, which only models single scattering and assumes
the contribution of multiple bounces to be zero, this new model performs a random walk on the microsurface until
the ray leaves it again, which ensures perfect energy conservation.
In practise, this means that the "darkening problem" - GGX materials becoming darker with increasing
roughness - is solved in a physically correct and efficient way.
The downside of this model is that it has no (known) analytic expression for evalation. However, it can be
evaluated stochastically, and although the correct PDF isn't known either, the properties of MIS and the
balance heuristic guarantee an unbiased result at the cost of slightly higher noise.
Reviewers: dingto, #cycles, brecht
Reviewed By: dingto, #cycles, brecht
Subscribers: bliblubli, ace_dragon, gregzaal, brecht, harvester, dingto, marcog, swerner, jtheninja, Blendify, nutel
Differential Revision: https://developer.blender.org/D2002
2016-06-23 20:56:43 +00:00
|
|
|
closure/bsdf_microfacet_multi.h
|
|
|
|
closure/bsdf_microfacet_multi_impl.h
|
2012-10-20 14:08:49 +00:00
|
|
|
closure/bsdf_oren_nayar.h
|
2012-11-06 19:59:07 +00:00
|
|
|
closure/bsdf_phong_ramp.h
|
2012-10-20 12:18:00 +00:00
|
|
|
closure/bsdf_reflection.h
|
|
|
|
closure/bsdf_refraction.h
|
2012-12-19 21:17:16 +00:00
|
|
|
closure/bsdf_toon.h
|
2012-10-20 12:18:00 +00:00
|
|
|
closure/bsdf_transparent.h
|
2012-12-15 10:18:42 +00:00
|
|
|
closure/bsdf_util.h
|
2014-06-08 10:16:28 +00:00
|
|
|
closure/bsdf_ashikhmin_shirley.h
|
2013-09-15 23:58:00 +00:00
|
|
|
closure/bsdf_hair.h
|
2013-04-01 20:26:52 +00:00
|
|
|
closure/bssrdf.h
|
2012-10-20 12:18:00 +00:00
|
|
|
closure/emissive.h
|
|
|
|
closure/volume.h
|
2017-04-18 09:43:09 +00:00
|
|
|
closure/bsdf_principled_diffuse.h
|
|
|
|
closure/bsdf_principled_sheen.h
|
2018-07-18 09:14:43 +00:00
|
|
|
closure/bsdf_hair_principled.h
|
2012-10-20 14:08:49 +00:00
|
|
|
)
|
Cycles: OpenCL kernel split
This commit contains all the work related on the AMD megakernel split work
which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus
some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely
someone else which we're forgetting to mention.
Currently only AMD cards are enabled for the new split kernel, but it is
possible to force split opencl kernel to be used by setting the following
environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1.
Not all the features are supported yet, and that being said no motion blur,
camera blur, SSS and volumetrics for now. Also transparent shadows are
disabled on AMD device because of some compiler bug.
This kernel is also only implements regular path tracing and supporting
branched one will take a bit. Branched path tracing is exposed to the
interface still, which is a bit misleading and will be hidden there soon.
More feature will be enabled once they're ported to the split kernel and
tested.
Neither regular CPU nor CUDA has any difference, they're generating the
same exact code, which means no regressions/improvements there.
Based on the research paper:
https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf
Here's the documentation:
https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit
Design discussion of the patch:
https://developer.blender.org/T44197
Differential Revision: https://developer.blender.org/D1200
2015-05-09 14:34:30 +00:00
|
|
|
|
2012-10-20 14:08:49 +00:00
|
|
|
set(SRC_SVM_HEADERS
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm.h
|
2018-06-15 09:03:29 +00:00
|
|
|
svm/svm_ao.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_attribute.h
|
2017-08-18 16:37:05 +00:00
|
|
|
svm/svm_bevel.h
|
2013-06-15 23:47:09 +00:00
|
|
|
svm/svm_blackbody.h
|
2016-08-14 15:44:25 +00:00
|
|
|
svm/svm_bump.h
|
2011-12-02 20:36:13 +00:00
|
|
|
svm/svm_camera.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_closure.h
|
|
|
|
svm/svm_convert.h
|
2012-01-08 14:55:43 +00:00
|
|
|
svm/svm_checker.h
|
2016-06-20 17:05:49 +00:00
|
|
|
svm/svm_color_util.h
|
2012-09-04 13:29:07 +00:00
|
|
|
svm/svm_brick.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_displace.h
|
|
|
|
svm/svm_fresnel.h
|
2013-05-20 15:58:37 +00:00
|
|
|
svm/svm_wireframe.h
|
2013-06-09 20:46:22 +00:00
|
|
|
svm/svm_wavelength.h
|
2011-12-16 20:35:06 +00:00
|
|
|
svm/svm_gamma.h
|
2012-01-24 16:32:31 +00:00
|
|
|
svm/svm_brightness.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_geometry.h
|
2011-11-06 21:05:58 +00:00
|
|
|
svm/svm_gradient.h
|
2011-12-02 16:57:37 +00:00
|
|
|
svm/svm_hsv.h
|
Cycles: Add Support for IES files as textures for light strength
This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources.
The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp.
Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried.
Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file.
The user interface of the node is similar to the script node, the user can either select an internal Text or load a file.
Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot.
The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light,
rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport.
Reviewers: #cycles, dingto, sergey, brecht
Reviewed By: #cycles, dingto, brecht
Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey
Differential Revision: https://developer.blender.org/D1543
2018-05-26 22:46:37 +00:00
|
|
|
svm/svm_ies.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_image.h
|
2011-12-03 23:05:35 +00:00
|
|
|
svm/svm_invert.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_light_path.h
|
|
|
|
svm/svm_magic.h
|
|
|
|
svm/svm_mapping.h
|
|
|
|
svm/svm_math.h
|
2014-10-26 14:40:04 +00:00
|
|
|
svm/svm_math_util.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_mix.h
|
|
|
|
svm/svm_musgrave.h
|
|
|
|
svm/svm_noise.h
|
|
|
|
svm/svm_noisetex.h
|
2011-12-16 18:15:07 +00:00
|
|
|
svm/svm_normal.h
|
2012-03-26 12:45:14 +00:00
|
|
|
svm/svm_ramp.h
|
2016-07-30 21:30:36 +00:00
|
|
|
svm/svm_ramp_util.h
|
2013-07-03 23:46:56 +00:00
|
|
|
svm/svm_sepcomb_hsv.h
|
2014-06-14 10:28:49 +00:00
|
|
|
svm/svm_sepcomb_vector.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_sky.h
|
|
|
|
svm/svm_tex_coord.h
|
|
|
|
svm/svm_texture.h
|
|
|
|
svm/svm_types.h
|
|
|
|
svm/svm_value.h
|
2013-06-23 17:51:08 +00:00
|
|
|
svm/svm_vector_transform.h
|
2011-04-27 11:58:34 +00:00
|
|
|
svm/svm_voronoi.h
|
2015-07-18 20:09:20 +00:00
|
|
|
svm/svm_voxel.h
|
2011-11-06 21:05:58 +00:00
|
|
|
svm/svm_wave.h
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2014-03-29 12:03:45 +00:00
|
|
|
set(SRC_GEOM_HEADERS
|
2014-03-29 12:03:48 +00:00
|
|
|
geom/geom.h
|
|
|
|
geom/geom_attribute.h
|
2014-03-29 12:03:45 +00:00
|
|
|
geom/geom_curve.h
|
2017-08-07 17:53:12 +00:00
|
|
|
geom/geom_curve_intersect.h
|
2014-03-29 12:03:47 +00:00
|
|
|
geom/geom_motion_curve.h
|
2014-03-29 12:03:47 +00:00
|
|
|
geom/geom_motion_triangle.h
|
2017-01-17 09:48:56 +00:00
|
|
|
geom/geom_motion_triangle_intersect.h
|
2017-01-17 09:58:04 +00:00
|
|
|
geom/geom_motion_triangle_shader.h
|
2014-03-29 12:03:45 +00:00
|
|
|
geom/geom_object.h
|
2016-07-17 02:57:06 +00:00
|
|
|
geom/geom_patch.h
|
2014-03-29 12:03:48 +00:00
|
|
|
geom/geom_primitive.h
|
2016-07-16 23:42:28 +00:00
|
|
|
geom/geom_subd_triangle.h
|
2014-03-29 12:03:45 +00:00
|
|
|
geom/geom_triangle.h
|
2014-12-15 15:21:41 +00:00
|
|
|
geom/geom_triangle_intersect.h
|
2014-03-29 12:03:48 +00:00
|
|
|
geom/geom_volume.h
|
2014-03-29 12:03:45 +00:00
|
|
|
)
|
|
|
|
|
2017-05-07 12:40:58 +00:00
|
|
|
set(SRC_FILTER_HEADERS
|
|
|
|
filter/filter.h
|
|
|
|
filter/filter_defines.h
|
|
|
|
filter/filter_features.h
|
|
|
|
filter/filter_features_sse.h
|
|
|
|
filter/filter_kernel.h
|
|
|
|
filter/filter_nlm_cpu.h
|
|
|
|
filter/filter_nlm_gpu.h
|
|
|
|
filter/filter_prefilter.h
|
|
|
|
filter/filter_reconstruction.h
|
|
|
|
filter/filter_transform.h
|
|
|
|
filter/filter_transform_gpu.h
|
|
|
|
filter/filter_transform_sse.h
|
|
|
|
)
|
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(SRC_UTIL_HEADERS
|
2015-05-21 10:48:50 +00:00
|
|
|
../util/util_atomic.h
|
2011-08-11 12:36:08 +00:00
|
|
|
../util/util_color.h
|
2017-08-02 00:09:08 +00:00
|
|
|
../util/util_defines.h
|
2014-01-15 14:29:22 +00:00
|
|
|
../util/util_half.h
|
2016-10-29 22:56:39 +00:00
|
|
|
../util/util_hash.h
|
2011-08-11 12:36:08 +00:00
|
|
|
../util/util_math.h
|
2015-01-30 12:56:47 +00:00
|
|
|
../util/util_math_fast.h
|
2017-03-23 11:47:27 +00:00
|
|
|
../util/util_math_intersect.h
|
2017-04-14 12:05:23 +00:00
|
|
|
../util/util_math_float2.h
|
|
|
|
../util/util_math_float3.h
|
|
|
|
../util/util_math_float4.h
|
|
|
|
../util/util_math_int2.h
|
|
|
|
../util/util_math_int3.h
|
|
|
|
../util/util_math_int4.h
|
2017-05-07 12:40:58 +00:00
|
|
|
../util/util_math_matrix.h
|
2018-03-08 04:33:55 +00:00
|
|
|
../util/util_projection.h
|
Cycles: Improve denoising speed on GPUs with small tile sizes
Previously, the NLM kernels would be launched once per offset with one thread per pixel.
However, with the smaller tile sizes that are now feasible, there wasn't enough work to fully occupy GPUs which results in a significant slowdown.
Therefore, the kernels are now launched in a single call that handles all offsets at once.
This has two downsides: Memory accesses to accumulating buffers are now atomic, and more importantly, the temporary memory now has to be allocated for every shift at once, increasing the required memory.
On the other hand, of course, the smaller tiles significantly reduce the size of the memory.
The main bottleneck right now is the construction of the transformation - there is nothing to be parallelized there, one thread per pixel is the maximum.
I tried to parallelize the SVD implementation by storing the matrix in shared memory and launching one block per pixel, but that wasn't really going anywhere.
To make the new code somewhat readable, the handling of rectangular regions was cleaned up a bit and commented, it should be easier to understand what's going on now.
Also, some variables have been renamed to make the difference between buffer width and stride more apparent, in addition to some general style cleanup.
2017-11-10 03:34:14 +00:00
|
|
|
../util/util_rect.h
|
2016-08-11 07:52:39 +00:00
|
|
|
../util/util_static_assert.h
|
2011-08-11 12:36:08 +00:00
|
|
|
../util/util_transform.h
|
2016-04-16 09:58:38 +00:00
|
|
|
../util/util_texture.h
|
2011-11-08 20:27:37 +00:00
|
|
|
../util/util_types.h
|
2017-04-13 17:34:45 +00:00
|
|
|
../util/util_types_float2.h
|
|
|
|
../util/util_types_float2_impl.h
|
|
|
|
../util/util_types_float3.h
|
|
|
|
../util/util_types_float3_impl.h
|
|
|
|
../util/util_types_float4.h
|
|
|
|
../util/util_types_float4_impl.h
|
2018-02-14 10:23:30 +00:00
|
|
|
../util/util_types_float8.h
|
|
|
|
../util/util_types_float8_impl.h
|
2017-04-13 17:34:45 +00:00
|
|
|
../util/util_types_int2.h
|
|
|
|
../util/util_types_int2_impl.h
|
|
|
|
../util/util_types_int3.h
|
|
|
|
../util/util_types_int3_impl.h
|
|
|
|
../util/util_types_int4.h
|
|
|
|
../util/util_types_int4_impl.h
|
|
|
|
../util/util_types_uchar2.h
|
|
|
|
../util/util_types_uchar2_impl.h
|
|
|
|
../util/util_types_uchar3.h
|
|
|
|
../util/util_types_uchar3_impl.h
|
|
|
|
../util/util_types_uchar4.h
|
|
|
|
../util/util_types_uchar4_impl.h
|
|
|
|
../util/util_types_uint2.h
|
|
|
|
../util/util_types_uint2_impl.h
|
|
|
|
../util/util_types_uint3.h
|
|
|
|
../util/util_types_uint3_impl.h
|
|
|
|
../util/util_types_uint4.h
|
|
|
|
../util/util_types_uint4_impl.h
|
2018-07-05 10:37:52 +00:00
|
|
|
../util/util_types_ushort4.h
|
2017-04-13 17:34:45 +00:00
|
|
|
../util/util_types_vector3.h
|
|
|
|
../util/util_types_vector3_impl.h
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2015-05-21 12:40:04 +00:00
|
|
|
|
|
|
|
set(SRC_SPLIT_HEADERS
|
2017-03-21 02:31:54 +00:00
|
|
|
split/kernel_branched.h
|
2017-03-08 14:42:26 +00:00
|
|
|
split/kernel_buffer_update.h
|
2015-05-21 12:40:04 +00:00
|
|
|
split/kernel_data_init.h
|
|
|
|
split/kernel_direct_lighting.h
|
2017-03-08 14:42:26 +00:00
|
|
|
split/kernel_do_volume.h
|
2017-05-30 00:40:26 +00:00
|
|
|
split/kernel_enqueue_inactive.h
|
2015-05-21 12:40:04 +00:00
|
|
|
split/kernel_holdout_emission_blurring_pathtermination_ao.h
|
2017-03-08 14:42:26 +00:00
|
|
|
split/kernel_indirect_background.h
|
|
|
|
split/kernel_indirect_subsurface.h
|
2015-05-21 12:40:04 +00:00
|
|
|
split/kernel_lamp_emission.h
|
|
|
|
split/kernel_next_iteration_setup.h
|
2017-03-01 06:05:55 +00:00
|
|
|
split/kernel_path_init.h
|
2017-02-22 13:10:02 +00:00
|
|
|
split/kernel_queue_enqueue.h
|
2015-05-21 12:40:04 +00:00
|
|
|
split/kernel_scene_intersect.h
|
2017-05-03 13:30:45 +00:00
|
|
|
split/kernel_shader_setup.h
|
|
|
|
split/kernel_shader_sort.h
|
2015-05-21 12:40:04 +00:00
|
|
|
split/kernel_shader_eval.h
|
2017-03-08 16:39:40 +00:00
|
|
|
split/kernel_shadow_blocked_ao.h
|
|
|
|
split/kernel_shadow_blocked_dl.h
|
2015-05-21 12:40:04 +00:00
|
|
|
split/kernel_split_common.h
|
2017-02-22 13:10:02 +00:00
|
|
|
split/kernel_split_data.h
|
2017-03-08 10:02:54 +00:00
|
|
|
split/kernel_split_data_types.h
|
2017-03-08 14:42:26 +00:00
|
|
|
split/kernel_subsurface_scatter.h
|
2015-05-21 12:40:04 +00:00
|
|
|
)
|
|
|
|
|
2011-11-10 12:52:17 +00:00
|
|
|
# CUDA module
|
|
|
|
|
|
|
|
if(WITH_CYCLES_CUDA_BINARIES)
|
2018-02-17 15:15:07 +00:00
|
|
|
# 64 bit only
|
|
|
|
set(CUDA_BITS 64)
|
2011-11-10 12:52:17 +00:00
|
|
|
|
2013-06-19 17:54:23 +00:00
|
|
|
# CUDA version
|
2015-06-30 12:44:27 +00:00
|
|
|
execute_process(COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT)
|
2016-05-09 14:05:02 +00:00
|
|
|
string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${NVCC_OUT}")
|
|
|
|
string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${NVCC_OUT}")
|
2013-06-19 17:54:23 +00:00
|
|
|
set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}")
|
|
|
|
|
2013-06-20 13:10:47 +00:00
|
|
|
# warn for other versions
|
2018-12-04 11:34:59 +00:00
|
|
|
if(CUDA_VERSION MATCHES "90" OR CUDA_VERSION MATCHES "91" OR CUDA_VERSION MATCHES "100")
|
2013-06-20 13:10:47 +00:00
|
|
|
else()
|
2014-03-13 12:31:06 +00:00
|
|
|
message(WARNING
|
|
|
|
"CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
|
2018-12-04 11:34:59 +00:00
|
|
|
"build may succeed but only CUDA 9.0, 9.1 and 10.0 are officially supported")
|
2013-06-20 13:10:47 +00:00
|
|
|
endif()
|
|
|
|
|
2013-06-19 17:54:23 +00:00
|
|
|
# build for each arch
|
2017-02-14 10:50:29 +00:00
|
|
|
set(cuda_sources kernels/cuda/kernel.cu kernels/cuda/kernel_split.cu
|
2016-07-11 10:28:45 +00:00
|
|
|
${SRC_HEADERS}
|
2017-02-14 10:50:29 +00:00
|
|
|
${SRC_KERNELS_CUDA_HEADERS}
|
2016-07-11 10:28:45 +00:00
|
|
|
${SRC_BVH_HEADERS}
|
|
|
|
${SRC_SVM_HEADERS}
|
|
|
|
${SRC_GEOM_HEADERS}
|
|
|
|
${SRC_CLOSURE_HEADERS}
|
|
|
|
${SRC_UTIL_HEADERS}
|
|
|
|
)
|
2017-05-07 12:40:58 +00:00
|
|
|
set(cuda_filter_sources kernels/cuda/filter.cu
|
|
|
|
${SRC_HEADERS}
|
|
|
|
${SRC_KERNELS_CUDA_HEADERS}
|
|
|
|
${SRC_FILTER_HEADERS}
|
|
|
|
${SRC_UTIL_HEADERS}
|
|
|
|
)
|
2011-11-10 12:52:17 +00:00
|
|
|
set(cuda_cubins)
|
|
|
|
|
2018-08-20 08:17:34 +00:00
|
|
|
macro(CYCLES_CUDA_KERNEL_ADD arch prev_arch name flags sources experimental)
|
2018-02-03 17:59:09 +00:00
|
|
|
set(cuda_cubin ${name}_${arch}.cubin)
|
2018-08-20 08:17:34 +00:00
|
|
|
|
|
|
|
set(kernel_sources ${sources})
|
|
|
|
if(NOT ${prev_arch} STREQUAL "none")
|
|
|
|
set(kernel_sources ${kernel_sources} ${name}_${prev_arch}.cubin)
|
|
|
|
endif()
|
|
|
|
|
2018-02-03 17:59:09 +00:00
|
|
|
set(cuda_kernel_src "/kernels/cuda/${name}.cu")
|
|
|
|
|
|
|
|
set(cuda_flags
|
|
|
|
-D CCL_NAMESPACE_BEGIN=
|
|
|
|
-D CCL_NAMESPACE_END=
|
|
|
|
-D NVCC
|
|
|
|
-m ${CUDA_BITS}
|
|
|
|
-I ${CMAKE_CURRENT_SOURCE_DIR}/..
|
|
|
|
-I ${CMAKE_CURRENT_SOURCE_DIR}/kernels/cuda
|
|
|
|
--use_fast_math
|
|
|
|
-o ${CMAKE_CURRENT_BINARY_DIR}/${cuda_cubin})
|
|
|
|
|
2017-02-14 10:50:29 +00:00
|
|
|
if(${experimental})
|
2018-02-03 17:59:09 +00:00
|
|
|
set(cuda_flags ${cuda_flags} -D __KERNEL_EXPERIMENTAL__)
|
2017-05-07 12:40:58 +00:00
|
|
|
set(name ${name}_experimental)
|
2014-08-26 15:02:03 +00:00
|
|
|
endif()
|
2011-11-10 12:52:17 +00:00
|
|
|
|
2014-10-05 15:42:04 +00:00
|
|
|
if(WITH_CYCLES_DEBUG)
|
2018-02-03 17:59:09 +00:00
|
|
|
set(cuda_flags ${cuda_flags} -D __KERNEL_DEBUG__)
|
2014-10-05 15:42:04 +00:00
|
|
|
endif()
|
|
|
|
|
2018-12-04 10:49:57 +00:00
|
|
|
# Workaround to build only sm_7x kernels with CUDA 10, until
|
|
|
|
# older kernels work well with this version.
|
|
|
|
if(DEFINED CUDA10_NVCC_EXECUTABLE AND (${arch} MATCHES "sm_7."))
|
|
|
|
set(with_cubin_compiler OFF)
|
|
|
|
set(cuda_nvcc_executable "${CUDA10_NVCC_EXECUTABLE}")
|
|
|
|
set(cuda_toolkit_root_dir "${CUDA10_TOOLKIT_ROOT_DIR}")
|
|
|
|
else()
|
|
|
|
set(with_cubin_compiler ${WITH_CYCLES_CUBIN_COMPILER})
|
|
|
|
set(cuda_nvcc_executable "${CUDA_NVCC_EXECUTABLE}")
|
|
|
|
set(cuda_toolkit_root_dir "${CUDA_TOOLKIT_ROOT_DIR}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(with_cubin_compiler)
|
2018-02-03 17:59:09 +00:00
|
|
|
string(SUBSTRING ${arch} 3 -1 CUDA_ARCH)
|
|
|
|
|
|
|
|
# Needed to find libnvrtc-builtins.so. Can't do it from inside
|
|
|
|
# cycles_cubin_cc since the env variable is read before main()
|
|
|
|
if(APPLE)
|
|
|
|
set(CUBIN_CC_ENV ${CMAKE_COMMAND}
|
2018-12-04 10:49:57 +00:00
|
|
|
-E env DYLD_LIBRARY_PATH="${cuda_toolkit_root_dir}/lib")
|
2018-02-03 17:59:09 +00:00
|
|
|
elseif(UNIX)
|
|
|
|
set(CUBIN_CC_ENV ${CMAKE_COMMAND}
|
2018-12-04 10:49:57 +00:00
|
|
|
-E env LD_LIBRARY_PATH="${cuda_toolkit_root_dir}/lib64")
|
2018-02-03 17:59:09 +00:00
|
|
|
endif()
|
2014-08-26 15:02:03 +00:00
|
|
|
|
2018-02-03 17:59:09 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${cuda_cubin}
|
|
|
|
COMMAND ${CUBIN_CC_ENV}
|
|
|
|
"$<TARGET_FILE:cycles_cubin_cc>"
|
|
|
|
-target ${CUDA_ARCH}
|
|
|
|
-i ${CMAKE_CURRENT_SOURCE_DIR}${cuda_kernel_src}
|
|
|
|
${cuda_flags}
|
|
|
|
-v
|
2018-12-04 10:49:57 +00:00
|
|
|
-cuda-toolkit-dir "${cuda_toolkit_root_dir}"
|
2018-08-20 08:17:34 +00:00
|
|
|
DEPENDS ${kernel_sources} cycles_cubin_cc)
|
2018-02-03 17:59:09 +00:00
|
|
|
else()
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${cuda_cubin}
|
2018-12-04 10:49:57 +00:00
|
|
|
COMMAND ${cuda_nvcc_executable}
|
2018-02-03 17:59:09 +00:00
|
|
|
-arch=${arch}
|
|
|
|
${CUDA_NVCC_FLAGS}
|
|
|
|
--cubin
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}${cuda_kernel_src}
|
|
|
|
--ptxas-options="-v"
|
|
|
|
${cuda_flags}
|
2018-08-20 08:17:34 +00:00
|
|
|
DEPENDS ${kernel_sources})
|
2018-02-03 17:59:09 +00:00
|
|
|
endif()
|
2014-08-26 15:02:03 +00:00
|
|
|
delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${cuda_cubin}" ${CYCLES_INSTALL_PATH}/lib)
|
|
|
|
list(APPEND cuda_cubins ${cuda_cubin})
|
|
|
|
|
2014-10-05 15:42:04 +00:00
|
|
|
unset(cuda_debug_flags)
|
2014-08-26 15:02:03 +00:00
|
|
|
endmacro()
|
|
|
|
|
2018-08-20 08:17:34 +00:00
|
|
|
set(prev_arch "none")
|
2014-08-26 15:02:03 +00:00
|
|
|
foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
|
2018-02-06 14:19:25 +00:00
|
|
|
if(${arch} MATCHES "sm_2.")
|
|
|
|
message(STATUS "CUDA binaries for ${arch} are no longer supported, skipped.")
|
2018-12-11 13:14:52 +00:00
|
|
|
elseif(${arch} MATCHES "sm_7." AND (${CUDA_VERSION} LESS 100) AND (NOT DEFINED CUDA10_NVCC_EXECUTABLE))
|
2018-12-04 11:34:59 +00:00
|
|
|
message(STATUS "CUDA binaries for ${arch} require CUDA 10.0+, skipped.")
|
2018-02-06 14:19:25 +00:00
|
|
|
else()
|
|
|
|
# Compile regular kernel
|
2018-08-20 08:17:34 +00:00
|
|
|
CYCLES_CUDA_KERNEL_ADD(${arch} ${prev_arch} filter "" "${cuda_filter_sources}" FALSE)
|
|
|
|
CYCLES_CUDA_KERNEL_ADD(${arch} ${prev_arch} kernel "" "${cuda_sources}" FALSE)
|
2017-10-01 12:04:34 +00:00
|
|
|
|
2018-08-20 08:17:34 +00:00
|
|
|
if(WITH_CYCLES_CUDA_SPLIT_KERNEL_BINARIES)
|
|
|
|
# Compile split kernel
|
|
|
|
CYCLES_CUDA_KERNEL_ADD(${arch} ${prev_arch} kernel_split "-D __SPLIT__" "${cuda_sources}" FALSE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_CYCLES_CUDA_BUILD_SERIAL)
|
|
|
|
set(prev_arch ${arch})
|
|
|
|
endif()
|
2017-02-14 10:50:29 +00:00
|
|
|
endif()
|
2011-11-10 12:52:17 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_custom_target(cycles_kernel_cuda ALL DEPENDS ${cuda_cubins})
|
2018-02-03 23:38:27 +00:00
|
|
|
cycles_set_solution_folder(cycles_kernel_cuda)
|
2011-11-10 12:52:17 +00:00
|
|
|
endif()
|
2011-08-11 12:36:08 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
# OSL module
|
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(WITH_CYCLES_OSL)
|
|
|
|
add_subdirectory(osl)
|
2012-11-03 14:32:13 +00:00
|
|
|
add_subdirectory(shaders)
|
2011-08-16 16:15:34 +00:00
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
# CPU module
|
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
include_directories(${INC})
|
2012-09-20 09:04:43 +00:00
|
|
|
include_directories(SYSTEM ${INC_SYS})
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2017-03-30 09:23:26 +00:00
|
|
|
set_source_files_properties(kernels/cpu/kernel.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_split.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
2017-05-07 12:40:58 +00:00
|
|
|
set_source_files_properties(kernels/cpu/filter.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
2017-03-30 09:23:26 +00:00
|
|
|
|
2017-05-16 19:27:57 +00:00
|
|
|
if(CXX_HAS_SSE)
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_sse2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_sse3.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE3_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_sse41.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_split_sse2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_split_sse3.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE3_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_split_sse41.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/filter_sse2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/filter_sse3.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE3_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/filter_sse41.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS}")
|
|
|
|
endif()
|
2014-03-26 23:15:36 +00:00
|
|
|
|
2017-05-16 19:27:57 +00:00
|
|
|
if(CXX_HAS_AVX)
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_avx.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_split_avx.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/filter_avx.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX_KERNEL_FLAGS}")
|
|
|
|
endif()
|
2017-05-15 16:37:33 +00:00
|
|
|
|
2017-05-16 19:27:57 +00:00
|
|
|
if(CXX_HAS_AVX2)
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_avx2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/kernel_split_avx2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}")
|
|
|
|
set_source_files_properties(kernels/cpu/filter_avx2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}")
|
2014-12-07 10:22:05 +00:00
|
|
|
endif()
|
2013-11-22 13:16:47 +00:00
|
|
|
|
2018-02-03 23:38:27 +00:00
|
|
|
cycles_add_library(cycles_kernel
|
2017-10-07 12:08:02 +00:00
|
|
|
${SRC_CPU_KERNELS}
|
|
|
|
${SRC_CUDA_KERNELS}
|
|
|
|
${SRC_OPENCL_KERNELS}
|
2015-12-30 13:51:35 +00:00
|
|
|
${SRC_HEADERS}
|
|
|
|
${SRC_KERNELS_CPU_HEADERS}
|
2017-02-14 10:50:29 +00:00
|
|
|
${SRC_KERNELS_CUDA_HEADERS}
|
2017-05-11 23:23:49 +00:00
|
|
|
${SRC_KERNELS_OPENCL_HEADERS}
|
2016-07-11 10:28:45 +00:00
|
|
|
${SRC_BVH_HEADERS}
|
2015-12-30 13:51:35 +00:00
|
|
|
${SRC_CLOSURE_HEADERS}
|
2017-05-07 12:40:58 +00:00
|
|
|
${SRC_FILTER_HEADERS}
|
2015-12-30 13:51:35 +00:00
|
|
|
${SRC_SVM_HEADERS}
|
|
|
|
${SRC_GEOM_HEADERS}
|
|
|
|
${SRC_SPLIT_HEADERS}
|
|
|
|
)
|
2013-11-22 13:16:47 +00:00
|
|
|
|
2011-08-16 16:15:34 +00:00
|
|
|
if(WITH_CYCLES_CUDA)
|
|
|
|
add_dependencies(cycles_kernel cycles_kernel_cuda)
|
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-15 15:13:38 +00:00
|
|
|
# OpenCL kernel
|
2011-05-20 12:26:01 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
#set(KERNEL_PREPROCESSED ${CMAKE_CURRENT_BINARY_DIR}/kernel_preprocessed.cl)
|
2011-09-02 14:55:06 +00:00
|
|
|
#add_custom_command(
|
2011-11-08 20:27:37 +00:00
|
|
|
# OUTPUT ${KERNEL_PREPROCESSED}
|
2011-12-20 17:36:56 +00:00
|
|
|
# COMMAND gcc -x c++ -E ${CMAKE_CURRENT_SOURCE_DIR}/kernel.cl -I ${CMAKE_CURRENT_SOURCE_DIR}/../util/ -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -o ${KERNEL_PREPROCESSED}
|
2011-11-08 20:27:37 +00:00
|
|
|
# DEPENDS ${SRC_KERNEL} ${SRC_UTIL_HEADERS})
|
|
|
|
#add_custom_target(cycles_kernel_preprocess ALL DEPENDS ${KERNEL_PREPROCESSED})
|
|
|
|
#delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${KERNEL_PREPROCESSED}" ${CYCLES_INSTALL_PATH}/kernel)
|
2011-09-02 14:55:06 +00:00
|
|
|
|
2017-10-07 12:08:02 +00:00
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_OPENCL_KERNELS}" ${CYCLES_INSTALL_PATH}/source/kernel/kernels/opencl)
|
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_CUDA_KERNELS}" ${CYCLES_INSTALL_PATH}/source/kernel/kernels/cuda)
|
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
2017-03-28 18:39:14 +00:00
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel)
|
2017-10-07 12:08:02 +00:00
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNELS_OPENCL_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/kernels/opencl)
|
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
2017-03-28 18:39:14 +00:00
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_KERNELS_CUDA_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/kernels/cuda)
|
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_BVH_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/bvh)
|
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_CLOSURE_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/closure)
|
2017-05-07 12:40:58 +00:00
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_FILTER_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/filter)
|
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
2017-03-28 18:39:14 +00:00
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_SVM_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/svm)
|
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_GEOM_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/geom)
|
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_UTIL_HEADERS}" ${CYCLES_INSTALL_PATH}/source/util)
|
|
|
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_SPLIT_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/split)
|