diff --git a/intern/cycles/bvh/embree.cpp b/intern/cycles/bvh/embree.cpp index 596428cd189..a4efb565306 100644 --- a/intern/cycles/bvh/embree.cpp +++ b/intern/cycles/bvh/embree.cpp @@ -303,7 +303,7 @@ void BVHEmbree::set_tri_vertex_buffer(RTCGeometry geom_id, const Mesh *mesh, con int t_ = (t > t_mid) ? (t - 1) : t; verts = &attr_mP->data_float3()[t_ * num_verts]; } - + if (update) { rtcUpdateGeometryBuffer(geom_id, RTC_BUFFER_TYPE_VERTEX, t); } diff --git a/intern/cycles/kernel/geom/triangle_intersect.h b/intern/cycles/kernel/geom/triangle_intersect.h index f0a10bb0241..8041b1ef4fd 100644 --- a/intern/cycles/kernel/geom/triangle_intersect.h +++ b/intern/cycles/kernel/geom/triangle_intersect.h @@ -145,8 +145,8 @@ ccl_device_inline float3 triangle_point_from_uv(KernelGlobals kg, { const uint3 tri_vindex = kernel_data_fetch(tri_vindex, isect_prim); const float3 tri_a = kernel_data_fetch(tri_verts, tri_vindex.x), - tri_b = kernel_data_fetch(tri_verts, tri_vindex.y), - tri_c = kernel_data_fetch(tri_verts, tri_vindex.z); + tri_b = kernel_data_fetch(tri_verts, tri_vindex.y), + tri_c = kernel_data_fetch(tri_verts, tri_vindex.z); /* This appears to give slightly better precision than interpolating with w = (1 - u - v). */ float3 P = tri_a + u * (tri_b - tri_a) + v * (tri_c - tri_a); diff --git a/intern/cycles/scene/mesh.cpp b/intern/cycles/scene/mesh.cpp index 3a4cf5d18bf..c1942d712d9 100644 --- a/intern/cycles/scene/mesh.cpp +++ b/intern/cycles/scene/mesh.cpp @@ -767,8 +767,8 @@ void Mesh::pack_verts(packed_float3 *tri_verts, } for (size_t i = 0; i < triangles_size; i++) { tri_vindex[i] = make_packed_uint3(p_tris[off + 0] + vert_offset, - p_tris[off + 1] + vert_offset, - p_tris[off + 2] + vert_offset); + p_tris[off + 1] + vert_offset, + p_tris[off + 2] + vert_offset); tri_patch[i] = triangle_patch[i] * 8 + patch_offset; off += 3; } diff --git a/intern/cycles/util/types_int3.h b/intern/cycles/util/types_int3.h index 1d3bf80574b..55b67289403 100644 --- a/intern/cycles/util/types_int3.h +++ b/intern/cycles/util/types_int3.h @@ -62,14 +62,16 @@ struct packed_int3 { ccl_device_inline_method packed_int3(){}; - ccl_device_inline_method packed_int3(const int px, const int py, const int pz) : x(px), y(py), z(pz) {}; + ccl_device_inline_method packed_int3(const int px, const int py, const int pz) + : x(px), y(py), z(pz){}; ccl_device_inline_method packed_int3(const int3 &a) : x(a.x), y(a.y), z(a.z) { } - - ccl_device_inline_method operator int3() const { - return make_int3(x,y,z); + + ccl_device_inline_method operator int3() const + { + return make_int3(x, y, z); } ccl_device_inline_method packed_int3 &operator=(const int3 &a) diff --git a/intern/cycles/util/types_uint3.h b/intern/cycles/util/types_uint3.h index 81bac2f9120..dfdf8bd0261 100644 --- a/intern/cycles/util/types_uint3.h +++ b/intern/cycles/util/types_uint3.h @@ -34,14 +34,16 @@ struct packed_uint3 { ccl_device_inline_method packed_uint3(){}; - ccl_device_inline_method packed_uint3(const uint px, const uint py, const uint pz) : x(px), y(py), z(pz) {}; + ccl_device_inline_method packed_uint3(const uint px, const uint py, const uint pz) + : x(px), y(py), z(pz){}; ccl_device_inline_method packed_uint3(const uint3 &a) : x(a.x), y(a.y), z(a.z) { } - - ccl_device_inline_method operator uint3() const { - return make_uint3(x,y,z); + + ccl_device_inline_method operator uint3() const + { + return make_uint3(x, y, z); } ccl_device_inline_method packed_uint3 &operator=(const uint3 &a) diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index edc408d4a4f..568160f4c22 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -819,8 +819,8 @@ static int delete_soft(const char *file, const char **error_message) Class NSStringClass = objc_getClass("NSString"); SEL stringWithUTF8StringSel = sel_registerName("stringWithUTF8String:"); - id pathString = ((id(*)(Class, SEL, const char *))objc_msgSend)( - NSStringClass, stringWithUTF8StringSel, file); + id pathString = (( + id(*)(Class, SEL, const char *))objc_msgSend)(NSStringClass, stringWithUTF8StringSel, file); Class NSFileManagerClass = objc_getClass("NSFileManager"); SEL defaultManagerSel = sel_registerName("defaultManager"); @@ -831,8 +831,8 @@ static int delete_soft(const char *file, const char **error_message) id nsurl = ((id(*)(Class, SEL, id))objc_msgSend)(NSURLClass, fileURLWithPathSel, pathString); SEL trashItemAtURLSel = sel_registerName("trashItemAtURL:resultingItemURL:error:"); - BOOL deleteSuccessful = ((BOOL(*)(id, SEL, id, id, id))objc_msgSend)( - fileManager, trashItemAtURLSel, nsurl, nil, nil); + BOOL deleteSuccessful = (( + BOOL(*)(id, SEL, id, id, id))objc_msgSend)(fileManager, trashItemAtURLSel, nsurl, nil, nil); if (deleteSuccessful) { ret = 0; diff --git a/source/blender/gpu/shaders/gpu_shader_display_fallback_frag.glsl b/source/blender/gpu/shaders/gpu_shader_display_fallback_frag.glsl index 1676c3a8a75..fc8ccff67c9 100644 --- a/source/blender/gpu/shaders/gpu_shader_display_fallback_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_display_fallback_frag.glsl @@ -1,5 +1,5 @@ void main() { - fragColor = texture(image_texture, texCoord_interp); + fragColor = texture(image_texture, texCoord_interp); } diff --git a/source/blender/gpu/shaders/gpu_shader_display_fallback_vert.glsl b/source/blender/gpu/shaders/gpu_shader_display_fallback_vert.glsl index 167d22c975d..0ca1bf10178 100644 --- a/source/blender/gpu/shaders/gpu_shader_display_fallback_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_display_fallback_vert.glsl @@ -1,11 +1,11 @@ vec2 normalize_coordinates() { - return (vec2(2.0) * (pos / fullscreen)) - vec2(1.0); + return (vec2(2.0) * (pos / fullscreen)) - vec2(1.0); } void main() { - gl_Position = vec4(normalize_coordinates(), 0.0, 1.0); - texCoord_interp = texCoord; + gl_Position = vec4(normalize_coordinates(), 0.0, 1.0); + texCoord_interp = texCoord; }