Cleanup: tweak Cycles #includes in preparation for clang-format sorting
authorBrecht Van Lommel <brecht@blender.org>
Fri, 6 Mar 2020 13:15:21 +0000 (14:15 +0100)
committerBrecht Van Lommel <brecht@blender.org>
Fri, 6 Mar 2020 13:44:42 +0000 (14:44 +0100)
25 files changed:
intern/cycles/blender/blender_session.h
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_intern.h
intern/cycles/kernel/bvh/bvh_embree.h
intern/cycles/kernel/closure/bsdf.h
intern/cycles/kernel/geom/geom.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
intern/cycles/kernel/osl/background.cpp
intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp
intern/cycles/kernel/osl/bsdf_phong_ramp.cpp
intern/cycles/kernel/osl/emissive.cpp
intern/cycles/kernel/osl/osl_bssrdf.cpp
intern/cycles/kernel/osl/osl_closures.cpp
intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/kernel/osl/osl_shader.cpp
intern/cycles/kernel/split/kernel_split_common.h
intern/cycles/kernel/split/kernel_split_data.h
intern/cycles/render/camera.cpp
intern/cycles/render/coverage.cpp
intern/cycles/render/coverage.h
intern/cycles/render/nodes.cpp
intern/cycles/render/tables.h
intern/cycles/util/util_ssef.h

index 2f25ec740f9fa0827d81036f878643cdd7d349ca..a107d526dd6418344227f6ec32a344dc567e43bf 100644 (file)
 #ifndef __BLENDER_SESSION_H__
 #define __BLENDER_SESSION_H__
 
+#include "RNA_blender_cpp.h"
+
 #include "device/device.h"
+
+#include "render/bake.h"
 #include "render/scene.h"
 #include "render/session.h"
-#include "render/bake.h"
 
 #include "util/util_vector.h"
 
 CCL_NAMESPACE_BEGIN
 
+class BlenderSync;
 class ImageMetaData;
 class Scene;
 class Session;
index cf239ec39e2b1afcde28f045d34e5438151ac425..6a9671961abc4ab7ed17673d492c17f1ed863a37 100644 (file)
@@ -29,6 +29,7 @@
 #include "device/device_intern.h"
 #include "device/device_split_kernel.h"
 
+// clang-format off
 #include "kernel/kernel.h"
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/kernel_types.h"
@@ -40,6 +41,7 @@
 
 #include "kernel/osl/osl_shader.h"
 #include "kernel/osl/osl_globals.h"
+// clang-format on
 
 #include "render/buffers.h"
 #include "render/coverage.h"
index 5b8b86886c4cbbf1bf4dd91f684a29a1d6cde76d..0c229ac24cf664976bfd6a6cc44221dc001ad2fe 100644 (file)
 #ifndef __DEVICE_INTERN_H__
 #define __DEVICE_INTERN_H__
 
+#include "util/util_string.h"
+#include "util/util_vector.h"
+
 CCL_NAMESPACE_BEGIN
 
 class Device;
+class DeviceInfo;
+class Profiler;
+class Stats;
 
 Device *device_cpu_create(DeviceInfo &info, Stats &stats, Profiler &profiler, bool background);
 bool device_opencl_init();
index ffea7d374404607f9f67c369bc36e02bfe591a29..ca637288bee3d03b6738eba65d1ae74a1074a35a 100644 (file)
 #include <embree3/rtcore_ray.h>
 #include <embree3/rtcore_scene.h>
 
+// clang-format off
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/split/kernel_split_data_types.h"
 #include "kernel/kernel_globals.h"
+// clang-format on
+
 #include "util/util_vector.h"
 
 CCL_NAMESPACE_BEGIN
index b282bf5a350abe79049b3170729270e45ebe01d4..0a9631ad9312efc138d694af3a4c018b9c440690 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+// clang-format off
 #include "kernel/closure/bsdf_ashikhmin_velvet.h"
 #include "kernel/closure/bsdf_diffuse.h"
 #include "kernel/closure/bsdf_oren_nayar.h"
@@ -32,6 +33,7 @@
 #include "kernel/closure/bsdf_principled_sheen.h"
 #include "kernel/closure/bssrdf.h"
 #include "kernel/closure/volume.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index e81c1b781c83243a5298d7eb9996f5a9ea47d3f3..5ff4d5f7053e12e0e06a7e48322e9b1ef14a4b4c 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+// clang-format off
 #include "kernel/geom/geom_attribute.h"
 #include "kernel/geom/geom_object.h"
 #ifdef __PATCH_EVAL__
@@ -30,3 +31,4 @@
 #include "kernel/geom/geom_curve_intersect.h"
 #include "kernel/geom/geom_volume.h"
 #include "kernel/geom/geom_primitive.h"
+// clang-format on
index bdd2703a894815dc5d77b0dbcb853a1df206a8a6..74377f2c06958fbf6a660e29e7a8d3bf56c75a79 100644 (file)
@@ -18,6 +18,7 @@
 #  include "kernel/osl/osl_shader.h"
 #endif
 
+// clang-format off
 #include "kernel/kernel_random.h"
 #include "kernel/kernel_projection.h"
 #include "kernel/kernel_montecarlo.h"
@@ -49,6 +50,7 @@
 #include "kernel/kernel_path_surface.h"
 #include "kernel/kernel_path_volume.h"
 #include "kernel/kernel_path_subsurface.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index 9120fa7c3f30cf7117d1c9fc759944e3660212c2..9700aaba80f98302e1549b9913cdd07ecad6f745 100644 (file)
  * Release.
  */
 
+// clang-format off
 #include "kernel/closure/alloc.h"
 #include "kernel/closure/bsdf_util.h"
 #include "kernel/closure/bsdf.h"
 #include "kernel/closure/emissive.h"
+// clang-format on
 
 #include "kernel/svm/svm.h"
 
index 96b2bf1113218911eff392f2e512d31443cdcedc..091e53cfd83d6efa8f72325bd3b00a12ec33f04c 100644 (file)
@@ -20,6 +20,7 @@
  * simply includes this file without worry of copying actual implementation over.
  */
 
+// clang-format off
 #include "kernel/kernel_compat_cpu.h"
 
 #ifndef KERNEL_STUB
@@ -71,6 +72,7 @@
 #    include "kernel/split/kernel_data_init.h"
 #  endif /* __SPLIT_KERNEL__ */
 #endif   /* KERNEL_STUB */
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index b395227845de34015fe50ebd6d988b2504a7a956..3f9de5ab33dc5d16a62f6d659d6af856d0283d9c 100644 (file)
 
 #include "kernel/osl/osl_closures.h"
 
+// clang-format off
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/closure/alloc.h"
 #include "kernel/closure/emissive.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index c5edc7c9be30b5c2295031a3551bd68f4ae1fe9d..76a2e41abfa8a87981896f435bc7a42c1c4f7d02 100644 (file)
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/osl/osl_closures.h"
 
+// clang-format off
 #include "kernel/kernel_types.h"
 #include "kernel/kernel_montecarlo.h"
 #include "kernel/closure/alloc.h"
 #include "kernel/closure/bsdf_diffuse_ramp.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index 4b7e59ff932ac23fb909131be1185ea0dd3109f4..b78dc8a3a67ce585d2022d3cd256cfd53ed1ca29 100644 (file)
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/osl/osl_closures.h"
 
+// clang-format off
 #include "kernel/kernel_types.h"
 #include "kernel/closure/alloc.h"
 #include "kernel/closure/bsdf_phong_ramp.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index c29ddb13e2e1fb2e4f540c83483242f2ba428d4f..d656723bac28d65c726899963fcc77b92d168c77 100644 (file)
 
 #include "kernel/osl/osl_closures.h"
 
+// clang-format off
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/kernel_types.h"
 #include "kernel/closure/alloc.h"
 #include "kernel/closure/emissive.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index dd52c33071cf1000fdb6331f36b6e1e1eaadbdab..c5ca8616fbda26160b31d1ffe8fca0d64e3082d1 100644 (file)
@@ -35,6 +35,7 @@
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/osl/osl_closures.h"
 
+// clang-format off
 #include "kernel/kernel_types.h"
 #include "kernel/kernel_montecarlo.h"
 
@@ -43,6 +44,7 @@
 #include "kernel/closure/bsdf_diffuse.h"
 #include "kernel/closure/bsdf_principled_diffuse.h"
 #include "kernel/closure/bssrdf.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index 463a65f21a01d00be0528c9784a0761772e5f2f4..ea5e00ec23c7daf746d8385ff3b0481499b41259 100644 (file)
@@ -39,6 +39,7 @@
 #include "util/util_math.h"
 #include "util/util_param.h"
 
+// clang-format off
 #include "kernel/kernel_types.h"
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/split/kernel_split_data_types.h"
@@ -63,6 +64,7 @@
 #include "kernel/closure/bsdf_principled_diffuse.h"
 #include "kernel/closure/bsdf_principled_sheen.h"
 #include "kernel/closure/volume.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index 767bd7702aec64ee9fd71a1e5bfb4789f90bf3b4..4354226ba067b29223de7c42dc904030196b4eca 100644 (file)
@@ -39,6 +39,7 @@
 #include "util/util_logging.h"
 #include "util/util_string.h"
 
+// clang-format off
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/split/kernel_split_data_types.h"
 #include "kernel/kernel_globals.h"
@@ -56,6 +57,7 @@
 #include "kernel/kernel_projection.h"
 #include "kernel/kernel_accumulate.h"
 #include "kernel/kernel_shader.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index 0994bfaf9505337e6bbe861cda8dbb8601511c4a..2318813949e511b4671ccdb834032fe557bfb26c 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <OSL/oslexec.h>
 
+// clang-format off
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/kernel_montecarlo.h"
 #include "kernel/kernel_types.h"
@@ -28,6 +29,7 @@
 #include "kernel/osl/osl_globals.h"
 #include "kernel/osl/osl_services.h"
 #include "kernel/osl/osl_shader.h"
+// clang-format on
 
 #include "util/util_foreach.h"
 
index 384bc952460c1fddbb4bf91d154aa6614926278f..5114f2b03e551ae6e045755957e4d21c8e282efb 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef __KERNEL_SPLIT_H__
 #define __KERNEL_SPLIT_H__
 
+// clang-format off
 #include "kernel/kernel_math.h"
 #include "kernel/kernel_types.h"
 
@@ -52,6 +53,7 @@
 #ifdef __BRANCHED_PATH__
 #  include "kernel/split/kernel_branched.h"
 #endif
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index 433b1221a379c2cc827122aba876dbfcc50d68f2..decc537b39b490b2fa273ac829e26247c47ae6e3 100644 (file)
@@ -18,6 +18,7 @@
 #define __KERNEL_SPLIT_DATA_H__
 
 #include "kernel/split/kernel_split_data_types.h"
+
 #include "kernel/kernel_globals.h"
 
 CCL_NAMESPACE_BEGIN
index 14ccf6696bdc3f58a1feda8abfe2b24674acb202..74953afae9d66e47f760e4d22c4b729be0bf6045 100644 (file)
@@ -29,6 +29,7 @@
 #include "util/util_vector.h"
 
 /* needed for calculating differentials */
+// clang-format off
 #include "kernel/kernel_compat_cpu.h"
 #include "kernel/split/kernel_split_data.h"
 #include "kernel/kernel_globals.h"
@@ -36,6 +37,7 @@
 #include "kernel/kernel_differential.h"
 #include "kernel/kernel_montecarlo.h"
 #include "kernel/kernel_camera.h"
+// clang-format on
 
 CCL_NAMESPACE_BEGIN
 
index 0a29903728a274918e8ee0e6608eba0f419e67db..99d4daa69610af5f2f9407bbdd0468a5bdba8331 100644 (file)
  */
 
 #include "render/coverage.h"
+#include "render/buffers.h"
+
 #include "kernel/kernel_compat_cpu.h"
+#include "kernel/kernel_types.h"
 #include "kernel/split/kernel_split_data.h"
+
 #include "kernel/kernel_globals.h"
 #include "kernel/kernel_id_passes.h"
-#include "kernel/kernel_types.h"
+
 #include "util/util_map.h"
-#include "util/util_vector.h"
 
 CCL_NAMESPACE_BEGIN
 
index 3d1f6a2b04061cdb8fc81ec90971cb9074464c7e..12182c614da1f9c3c368be2d7ede0f2c9e6d9bcf 100644 (file)
  * limitations under the License.
  */
 
-#include "render/buffers.h"
-#include "kernel/kernel_compat_cpu.h"
-#include "kernel/split/kernel_split_data.h"
-#include "kernel/kernel_globals.h"
+#ifndef __COVERAGE_H__
+#define __COVERAGE_H__
+
 #include "util/util_map.h"
 #include "util/util_vector.h"
 
-#ifndef __COVERAGE_H__
-#  define __COVERAGE_H__
-
 CCL_NAMESPACE_BEGIN
 
+struct KernelGlobals;
+class RenderTile;
+
+typedef unordered_map<float, float> CoverageMap;
+
 class Coverage {
  public:
   Coverage(KernelGlobals *kg_, RenderTile &tile_) : kg(kg_), tile(tile_)
index a52b7f0ea0056d3fd58d1af5a69eb737ecc67e4c..3967b4ef00e907a98fb6ff6904436b06b876e4a4 100644 (file)
 #include "render/nodes.h"
 #include "render/scene.h"
 #include "render/svm.h"
-#include "kernel/svm/svm_color_util.h"
-#include "kernel/svm/svm_ramp_util.h"
-#include "kernel/svm/svm_math_util.h"
-#include "kernel/svm/svm_mapping_util.h"
 #include "render/osl.h"
 #include "render/constant_fold.h"
 
-#include "util/util_sky_model.h"
 #include "util/util_foreach.h"
 #include "util/util_logging.h"
+#include "util/util_sky_model.h"
 #include "util/util_transform.h"
 
+#include "kernel/svm/svm_color_util.h"
+#include "kernel/svm/svm_mapping_util.h"
+#include "kernel/svm/svm_math_util.h"
+#include "kernel/svm/svm_ramp_util.h"
+
 CCL_NAMESPACE_BEGIN
 
 /* Texture Mapping */
index 12b59bb0aeb8db4912ff360c08c6138c4e4fb95c..3ed2959ae59e8b9ad2454e94082db61e7683c4d8 100644 (file)
@@ -18,6 +18,7 @@
 #define __TABLES_H__
 
 #include "util/util_list.h"
+#include "util/util_vector.h"
 
 CCL_NAMESPACE_BEGIN
 
index fa525daf37c5a115b1e3ae15345e879462fad15a..e9f0efb4efbb374d6f386fb23dbae2602390ab00 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __UTIL_SSEF_H__
 #define __UTIL_SSEF_H__
 
+#include "util_ssei.h"
+
 CCL_NAMESPACE_BEGIN
 
 #ifdef __KERNEL_SSE2__