From cdc1ddf20bcf6b0a3783039a3828847afd3fd633 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 18 May 2021 12:53:27 +1000 Subject: Cleanup: clang-format --- intern/cycles/render/geometry.cpp | 8 +++++--- intern/cycles/render/geometry.h | 7 +++++-- intern/cycles/render/hair.cpp | 3 ++- intern/cycles/render/hair.h | 5 ++++- intern/cycles/render/mesh.h | 5 ++++- 5 files changed, 20 insertions(+), 8 deletions(-) (limited to 'intern') diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp index a1bb8b35ca0..6ab927a7909 100644 --- a/intern/cycles/render/geometry.cpp +++ b/intern/cycles/render/geometry.cpp @@ -46,7 +46,7 @@ CCL_NAMESPACE_BEGIN /* Geometry */ -PackFlags operator |=(PackFlags &pack_flags, uint32_t value) +PackFlags operator|=(PackFlags &pack_flags, uint32_t value) { pack_flags = (PackFlags)((uint32_t)pack_flags | value); return pack_flags; @@ -1324,7 +1324,8 @@ void GeometryManager::device_update_bvh(Device *device, // Iterate over scene mesh list instead of objects, since 'optix_prim_offset' was calculated // based on that list, which may be ordered differently from the object list. foreach (Geometry *geom, scene->geometry) { - /* Make a copy of the pack_flags so the current geometry's flags do not pollute the others'. */ + /* Make a copy of the pack_flags so the current geometry's flags do not pollute the others'. + */ PackFlags geom_pack_flags = pack_flags; if (geom->is_modified()) { @@ -1950,7 +1951,8 @@ void GeometryManager::device_update(Device *device, * Also update the BVH if the transformations change, we cannot rely on tagging the Geometry * as modified in this case, as we may accumulate displacement if the vertices do not also * change. */ - bool need_update_scene_bvh = (scene->bvh == nullptr || (update_flags & (TRANSFORM_MODIFIED | VISIBILITY_MODIFIED)) != 0); + bool need_update_scene_bvh = (scene->bvh == nullptr || + (update_flags & (TRANSFORM_MODIFIED | VISIBILITY_MODIFIED)) != 0); { scoped_callback_timer timer([scene](double time) { if (scene->update_stats) { diff --git a/intern/cycles/render/geometry.h b/intern/cycles/render/geometry.h index 4fd867d9894..4d11d04e4c8 100644 --- a/intern/cycles/render/geometry.h +++ b/intern/cycles/render/geometry.h @@ -59,7 +59,7 @@ enum PackFlags : uint32_t { PACK_ALL = (PACK_GEOMETRY | PACK_VERTICES | PACK_VISIBILITY), }; -PackFlags operator |= (PackFlags &pack_flags, uint32_t value); +PackFlags operator|=(PackFlags &pack_flags, uint32_t value); /* Geometry * @@ -144,7 +144,10 @@ class Geometry : public Node { int n, int total); - virtual void pack_primitives(PackedBVH *pack, int object, uint visibility, PackFlags pack_flags) = 0; + virtual void pack_primitives(PackedBVH *pack, + int object, + uint visibility, + PackFlags pack_flags) = 0; /* Check whether the geometry should have own BVH built separately. Briefly, * own BVH is needed for geometry, if: diff --git a/intern/cycles/render/hair.cpp b/intern/cycles/render/hair.cpp index 1cae16d7f32..72fc612c0c0 100644 --- a/intern/cycles/render/hair.cpp +++ b/intern/cycles/render/hair.cpp @@ -522,7 +522,8 @@ void Hair::pack_primitives(PackedBVH *pack, int object, uint visibility, PackFla uint type = has_motion_blur() ? ((curve_shape == CURVE_RIBBON) ? PRIMITIVE_MOTION_CURVE_RIBBON : PRIMITIVE_MOTION_CURVE_THICK) : - ((curve_shape == CURVE_RIBBON) ? PRIMITIVE_CURVE_RIBBON : PRIMITIVE_CURVE_THICK); + ((curve_shape == CURVE_RIBBON) ? PRIMITIVE_CURVE_RIBBON : + PRIMITIVE_CURVE_THICK); size_t index = 0; for (size_t j = 0; j < num_curves(); ++j) { diff --git a/intern/cycles/render/hair.h b/intern/cycles/render/hair.h index 9c553624077..1a8f422e8c4 100644 --- a/intern/cycles/render/hair.h +++ b/intern/cycles/render/hair.h @@ -146,7 +146,10 @@ class Hair : public Geometry { /* BVH */ void pack_curves(Scene *scene, float4 *curve_key_co, float4 *curve_data, size_t curvekey_offset); - void pack_primitives(PackedBVH *pack, int object, uint visibility, PackFlags pack_flags) override; + void pack_primitives(PackedBVH *pack, + int object, + uint visibility, + PackFlags pack_flags) override; }; CCL_NAMESPACE_END diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h index 23a4b91d626..e9e79f7f20d 100644 --- a/intern/cycles/render/mesh.h +++ b/intern/cycles/render/mesh.h @@ -232,7 +232,10 @@ class Mesh : public Geometry { size_t tri_offset); void pack_patches(uint *patch_data, uint vert_offset, uint face_offset, uint corner_offset); - void pack_primitives(PackedBVH *pack, int object, uint visibility, PackFlags pack_flags) override; + void pack_primitives(PackedBVH *pack, + int object, + uint visibility, + PackFlags pack_flags) override; void tessellate(DiagSplit *split); -- cgit v1.2.3