diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:18:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:18:52 +0300 |
commit | de777ad9e69320500bf05d97a7d6d60ba4fd0a93 (patch) | |
tree | a1141843a3e1df137bbc6490641bedf12a12a8fa | |
parent | 6d38d824377c55aaaed7e8283e81a7128bf6f728 (diff) | |
parent | 1daa20ad9f6f0c433a4e0a97a74e5beb9ea4e2c7 (diff) |
Merge branch 'master' into blender2.8
256 files changed, 370 insertions, 613 deletions
diff --git a/intern/cycles/app/cycles_cubin_cc.cpp b/intern/cycles/app/cycles_cubin_cc.cpp index 3c83bf2dae3..01a1234531b 100644 --- a/intern/cycles/app/cycles_cubin_cc.cpp +++ b/intern/cycles/app/cycles_cubin_cc.cpp @@ -164,7 +164,7 @@ bool link_ptxas(CompilationSettings &settings) ptx += " --verbose"; printf("%s\n", ptx.c_str()); } - + int pxresult = system(ptx.c_str()); if(pxresult) { fprintf(stderr, "Error: ptxas failed (%x)\n\n", pxresult); diff --git a/intern/cycles/app/cycles_server.cpp b/intern/cycles/app/cycles_server.cpp index e65b9d769e4..e2166473aa3 100644 --- a/intern/cycles/app/cycles_server.cpp +++ b/intern/cycles/app/cycles_server.cpp @@ -112,4 +112,3 @@ int main(int argc, const char **argv) return 0; } - diff --git a/intern/cycles/app/cycles_standalone.cpp b/intern/cycles/app/cycles_standalone.cpp index c682744f5fa..1ec8d18f410 100644 --- a/intern/cycles/app/cycles_standalone.cpp +++ b/intern/cycles/app/cycles_standalone.cpp @@ -524,4 +524,3 @@ int main(int argc, const char **argv) return 0; } - diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp index a46955322e3..895a83818df 100644 --- a/intern/cycles/app/cycles_xml.cpp +++ b/intern/cycles/app/cycles_xml.cpp @@ -184,7 +184,7 @@ static bool xml_equal_string(xml_node node, const char *name, const char *value) if(attr) return string_iequals(attr.value(), value); - + return false; } @@ -697,4 +697,3 @@ void xml_read_file(Scene *scene, const char *filepath) } CCL_NAMESPACE_END - diff --git a/intern/cycles/app/io_export_cycles_xml.py b/intern/cycles/app/io_export_cycles_xml.py index d02487aefa4..437a504d014 100644 --- a/intern/cycles/app/io_export_cycles_xml.py +++ b/intern/cycles/app/io_export_cycles_xml.py @@ -39,7 +39,7 @@ def write(node, fname): f = open(fname, "w") f.write(s) - + class CyclesXMLSettings(bpy.types.PropertyGroup): @classmethod def register(cls): @@ -53,11 +53,11 @@ class CyclesXMLSettings(bpy.types.PropertyGroup): maxlen=256, default='', subtype='FILE_PATH') - + @classmethod def unregister(cls): del bpy.types.Scene.cycles_xml - + # User Interface Drawing Code class RenderButtonsPanel(): bl_space_type = 'PROPERTIES' @@ -74,13 +74,13 @@ class PHYSICS_PT_fluid_export(RenderButtonsPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - + cycles = context.scene.cycles_xml - + #layout.prop(cycles, "filepath") layout.operator("export_mesh.cycles_xml") - + # Export Operator class ExportCyclesXML(bpy.types.Operator, ExportHelper): bl_idname = "export_mesh.cycles_xml" @@ -117,23 +117,23 @@ class ExportCyclesXML(bpy.types.Operator, ExportHelper): P += "%f %f %f " % (v.co[0], v.co[1], v.co[2]) verts_and_uvs = zip(mesh.tessfaces, mesh.tessface_uv_textures.active.data) - + for f, uvf in verts_and_uvs: vcount = len(f.vertices) nverts += str(vcount) + " " for v in f.vertices: verts += str(v) + " " - + uvs += str(uvf.uv1[0]) + " " + str(uvf.uv1[1]) + " " uvs += str(uvf.uv2[0]) + " " + str(uvf.uv2[1]) + " " uvs += str(uvf.uv3[0]) + " " + str(uvf.uv3[1]) + " " if vcount==4: uvs += " " + str(uvf.uv4[0]) + " " + str(uvf.uv4[1]) + " " - + node = etree.Element('mesh', attrib={'nverts': nverts.strip(), 'verts': verts.strip(), 'P': P, 'UV' : uvs.strip()}) - + # write to file write(node, filepath) @@ -147,5 +147,3 @@ def unregister(): if __name__ == "__main__": register() - - diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp index c5df5842bad..228f0645f94 100644 --- a/intern/cycles/blender/blender_camera.cpp +++ b/intern/cycles/blender/blender_camera.cpp @@ -124,7 +124,7 @@ static float blender_camera_focal_distance(BL::RenderEngine& b_engine, if(!b_dof_object) return b_camera.dof_distance(); - + /* for dof object, return distance along camera Z direction */ BL::Array<float, 16> b_ob_matrix; b_engine.camera_model_matrix(b_ob, bcam->use_spherical_stereo, b_ob_matrix); @@ -726,7 +726,7 @@ static void blender_camera_view_subset(BL::RenderEngine& b_engine, blender_camera_viewplane(&cam_bcam, cam_bcam.full_width, cam_bcam.full_height, &cam, &cam_aspect, &sensor_size); - + /* return */ *view_box = view * (1.0f/view_aspect); *cam_box = cam * (1.0f/cam_aspect); @@ -895,4 +895,3 @@ BufferParams BlenderSync::get_buffer_params(BL::RenderSettings& b_render, } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 6d6b367209d..70d6092622a 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -126,7 +126,7 @@ void BlenderSync::sync_light(BL::Object& b_parent, *use_portal = true; return; } - + BL::Lamp b_lamp(b_ob.data()); /* type */ @@ -200,7 +200,7 @@ void BlenderSync::sync_light(BL::Object& b_parent, PointerRNA clamp = RNA_pointer_get(&b_lamp.ptr, "cycles"); light->cast_shadow = get_boolean(clamp, "cast_shadow"); light->use_mis = get_boolean(clamp, "use_multiple_importance_sampling"); - + int samples = get_int(clamp, "samples"); if(get_boolean(cscene, "use_square_samples")) light->samples = samples * samples; @@ -394,7 +394,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph, if(object_map.sync(&object, b_ob, b_parent, key)) object_updated = true; - + /* mesh sync */ object->mesh = sync_mesh(b_depsgraph, b_ob, b_ob_instance, object_updated, hide_tris); @@ -543,7 +543,7 @@ static bool object_render_hide(BL::Object& b_ob, } parent = parent.parent(); } - + hide_triangles = hide_emitter; if(show_emitter) { @@ -563,7 +563,7 @@ void BlenderSync::sync_objects(BL::Depsgraph& b_depsgraph, float motion_time) { /* layer data */ bool motion = motion_time != 0.0f; - + if(!motion) { /* prepare for sync */ light_map.pre_sync(); @@ -729,4 +729,3 @@ void BlenderSync::sync_motion(BL::RenderSettings& b_render, } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_object_cull.cpp b/intern/cycles/blender/blender_object_cull.cpp index bdf7dc469b2..680d9d7b1ff 100644 --- a/intern/cycles/blender/blender_object_cull.cpp +++ b/intern/cycles/blender/blender_object_cull.cpp @@ -146,4 +146,3 @@ bool BlenderObjectCulling::test_distance(Scene *scene, float3 bb[8]) } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_particles.cpp b/intern/cycles/blender/blender_particles.cpp index bb8e2e1398e..a733a499826 100644 --- a/intern/cycles/blender/blender_particles.cpp +++ b/intern/cycles/blender/blender_particles.cpp @@ -68,7 +68,7 @@ bool BlenderSync::sync_dupli_particle(BL::Object& b_ob, /* add particle */ BL::Particle b_pa = b_psys.particles[persistent_id[0]]; Particle pa; - + pa.index = persistent_id[0]; pa.age = b_scene.frame_current() - b_pa.birth_time(); pa.lifetime = b_pa.lifetime(); diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp index 84b90cb53de..4c199f4838f 100644 --- a/intern/cycles/blender/blender_python.cpp +++ b/intern/cycles/blender/blender_python.cpp @@ -326,7 +326,7 @@ static PyObject *draw_func(PyObject * /*self*/, PyObject *args) if(!PyArg_ParseTuple(args, "OOOO", &pysession, &pygraph, &pyv3d, &pyrv3d)) return NULL; - + BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(pysession); if(PyLong_AsVoidPtr(pyrv3d)) { @@ -594,7 +594,7 @@ static PyObject *osl_compile_func(PyObject * /*self*/, PyObject *args) if(!PyArg_ParseTuple(args, "ss", &inputfile, &outputfile)) return NULL; - + /* return */ if(!OSLShaderManager::osl_compile(inputfile, outputfile)) Py_RETURN_FALSE; diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index ed92cb71f04..e2463200001 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -154,7 +154,7 @@ static SocketType::Type convert_socket_type(BL::NodeSocket& b_socket) return SocketType::STRING; case BL::NodeSocket::type_SHADER: return SocketType::CLOSURE; - + default: return SocketType::UNDEFINED; } @@ -436,7 +436,7 @@ static ShaderNode *add_node(Scene *scene, else if(b_node.is_a(&RNA_ShaderNodeBsdfGlossy)) { BL::ShaderNodeBsdfGlossy b_glossy_node(b_node); GlossyBsdfNode *glossy = new GlossyBsdfNode(); - + switch(b_glossy_node.distribution()) { case BL::ShaderNodeBsdfGlossy::distribution_SHARP: glossy->distribution = CLOSURE_BSDF_REFLECTION_ID; @@ -940,7 +940,7 @@ static ShaderInput *node_find_input_by_name(ShaderNode *node, BL::NodeSocket& b_socket) { string name = b_socket.name(); - + if(node_use_modified_socket_name(node)) { BL::Node::inputs_iterator b_input; bool found = false; @@ -1043,7 +1043,7 @@ static void add_nodes(Scene *scene, } } else if(b_node->is_a(&RNA_ShaderNodeGroup) || b_node->is_a(&RNA_NodeCustomGroup)) { - + BL::ShaderNodeTree b_group_ntree(PointerRNA_NULL); if(b_node->is_a(&RNA_ShaderNodeGroup)) b_group_ntree = BL::ShaderNodeTree(((BL::NodeGroup)(*b_node)).node_tree()); @@ -1085,7 +1085,7 @@ static void add_nodes(Scene *scene, output_map[b_output->ptr.data] = proxy->outputs[0]; } - + if(b_group_ntree) { add_nodes(scene, b_engine, @@ -1467,4 +1467,3 @@ void BlenderSync::sync_shaders(BL::Depsgraph& b_depsgraph) } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index b449302241d..f9e04bdef7c 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -292,7 +292,7 @@ void BlenderSync::sync_integrator() integrator->mesh_light_samples = mesh_light_samples * mesh_light_samples; integrator->subsurface_samples = subsurface_samples * subsurface_samples; integrator->volume_samples = volume_samples * volume_samples; - } + } else { integrator->diffuse_samples = diffuse_samples; integrator->glossy_samples = glossy_samples; @@ -327,7 +327,7 @@ void BlenderSync::sync_film() Film *film = scene->film; Film prevfilm = *film; - + film->exposure = get_float(cscene, "film_exposure"); film->filter_type = (FilterType)get_enum(cscene, "pixel_filter_type", @@ -580,7 +580,7 @@ SceneParams BlenderSync::get_scene_params(BL::Scene& b_scene, params.shadingsystem = SHADINGSYSTEM_SVM; else if(shadingsystem == 1) params.shadingsystem = SHADINGSYSTEM_OSL; - + if(background || DebugFlags().viewport_static_bvh) params.bvh_type = SceneParams::BVH_STATIC; else @@ -645,7 +645,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, /* device type */ vector<DeviceInfo>& devices = Device::available_devices(); - + /* device default CPU */ foreach(DeviceInfo& device, devices) { if(device.type == DEVICE_CPU) { @@ -720,7 +720,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, int aa_samples = get_int(cscene, "aa_samples"); int preview_samples = get_int(cscene, "preview_samples"); int preview_aa_samples = get_int(cscene, "preview_aa_samples"); - + if(get_boolean(cscene, "use_square_samples")) { aa_samples = aa_samples * aa_samples; preview_aa_samples = preview_aa_samples * preview_aa_samples; @@ -817,7 +817,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, params.shadingsystem = SHADINGSYSTEM_SVM; else if(shadingsystem == 1) params.shadingsystem = SHADINGSYSTEM_OSL; - + /* color managagement */ params.display_buffer_linear = GLEW_ARB_half_float_pixel && b_engine.support_display_space_shader(b_scene); @@ -833,4 +833,3 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h index 77ee590335c..1dce7ec99ef 100644 --- a/intern/cycles/blender/blender_sync.h +++ b/intern/cycles/blender/blender_sync.h @@ -218,4 +218,3 @@ private: CCL_NAMESPACE_END #endif /* __BLENDER_SYNC_H__ */ - diff --git a/intern/cycles/bvh/bvh_binning.cpp b/intern/cycles/bvh/bvh_binning.cpp index 63a7fc11668..f574f31b358 100644 --- a/intern/cycles/bvh/bvh_binning.cpp +++ b/intern/cycles/bvh/bvh_binning.cpp @@ -251,4 +251,3 @@ void BVHObjectBinning::split(BVHReference* prims, } CCL_NAMESPACE_END - diff --git a/intern/cycles/bvh/bvh_node.cpp b/intern/cycles/bvh/bvh_node.cpp index 24af919ff46..879d07b9625 100644 --- a/intern/cycles/bvh/bvh_node.cpp +++ b/intern/cycles/bvh/bvh_node.cpp @@ -206,7 +206,7 @@ void InnerNode::print(int depth) const { for(int i = 0; i < depth; i++) printf(" "); - + printf("inner node %p\n", (void*)this); if(children[0]) @@ -219,9 +219,8 @@ void LeafNode::print(int depth) const { for(int i = 0; i < depth; i++) printf(" "); - + printf("leaf node %d to %d\n", lo, hi); } CCL_NAMESPACE_END - diff --git a/intern/cycles/bvh/bvh_sort.cpp b/intern/cycles/bvh/bvh_sort.cpp index b40bf5bb21b..f4f73ab2f2f 100644 --- a/intern/cycles/bvh/bvh_sort.cpp +++ b/intern/cycles/bvh/bvh_sort.cpp @@ -201,4 +201,3 @@ void bvh_reference_sort(int start, } CCL_NAMESPACE_END - diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index 31deba2d796..585d9802279 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -123,7 +123,7 @@ public: /* Use OpenSubdiv patch evaluation */ bool use_patch_evaluation; - + /* Use Transparent shadows */ bool use_transparent; @@ -307,7 +307,7 @@ public: /* open shading language, only for CPU device */ virtual void *osl_memory() { return NULL; } - /* load/compile kernels, must be called before adding tasks */ + /* load/compile kernels, must be called before adding tasks */ virtual bool load_kernels( const DeviceRequestedFeatures& /*requested_features*/) { return true; } @@ -317,7 +317,7 @@ public: virtual void task_add(DeviceTask& task) = 0; virtual void task_wait() = 0; virtual void task_cancel() = 0; - + /* opengl drawing */ virtual void draw_pixels(device_memory& mem, int y, int w, int h, int width, int height, @@ -376,4 +376,3 @@ private: CCL_NAMESPACE_END #endif /* __DEVICE_H__ */ - diff --git a/intern/cycles/device/device_intern.h b/intern/cycles/device/device_intern.h index de487649045..941be448101 100644 --- a/intern/cycles/device/device_intern.h +++ b/intern/cycles/device/device_intern.h @@ -41,4 +41,3 @@ string device_cuda_capabilities(void); CCL_NAMESPACE_END #endif /* __DEVICE_INTERN_H__ */ - diff --git a/intern/cycles/device/device_memory.cpp b/intern/cycles/device/device_memory.cpp index 482af685011..a8d29896553 100644 --- a/intern/cycles/device/device_memory.cpp +++ b/intern/cycles/device/device_memory.cpp @@ -138,4 +138,3 @@ device_sub_ptr::~device_sub_ptr() } CCL_NAMESPACE_END - diff --git a/intern/cycles/device/device_memory.h b/intern/cycles/device/device_memory.h index b6f3c2913a5..2b4835c9c65 100644 --- a/intern/cycles/device/device_memory.h +++ b/intern/cycles/device/device_memory.h @@ -51,7 +51,7 @@ enum DataType { TYPE_UINT64, }; -static inline size_t datatype_size(DataType datatype) +static inline size_t datatype_size(DataType datatype) { switch(datatype) { case TYPE_UNKNOWN: return 1; @@ -497,4 +497,3 @@ protected: CCL_NAMESPACE_END #endif /* __DEVICE_MEMORY_H__ */ - diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp index 65102c3f20f..587840e551f 100644 --- a/intern/cycles/device/device_multi.cpp +++ b/intern/cycles/device/device_multi.cpp @@ -379,4 +379,3 @@ Device *device_multi_create(DeviceInfo& info, Stats &stats, bool background) } CCL_NAMESPACE_END - diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp index 5ad4405366e..204e405421d 100644 --- a/intern/cycles/device/device_network.cpp +++ b/intern/cycles/device/device_network.cpp @@ -797,5 +797,3 @@ void Device::server_run() CCL_NAMESPACE_END #endif - - diff --git a/intern/cycles/device/device_network.h b/intern/cycles/device/device_network.h index b734ba2bda9..96e0de742db 100644 --- a/intern/cycles/device/device_network.h +++ b/intern/cycles/device/device_network.h @@ -179,7 +179,7 @@ public: boost::asio::write(socket, boost::asio::buffer(archive_str), boost::asio::transfer_all(), error); - + if(error.value()) error_func->network_error(error.message()); @@ -193,7 +193,7 @@ public: boost::asio::write(socket, boost::asio::buffer(buffer, size), boost::asio::transfer_all(), error); - + if(error.value()) error_func->network_error(error.message()); } @@ -467,7 +467,7 @@ private: /* buffer and endpoint for receiving messages */ char receive_buffer[256]; boost::asio::ip::udp::endpoint receive_endpoint; - + // os, version, devices, status, host name, group name, ip as far as fields go struct ServerInfo { string cycles_version; @@ -489,4 +489,3 @@ CCL_NAMESPACE_END #endif #endif /* __DEVICE_NETWORK_H__ */ - diff --git a/intern/cycles/device/device_split_kernel.cpp b/intern/cycles/device/device_split_kernel.cpp index 74135a1f3c8..efaae8c84f4 100644 --- a/intern/cycles/device/device_split_kernel.cpp +++ b/intern/cycles/device/device_split_kernel.cpp @@ -261,7 +261,7 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task, ENQUEUE_SPLIT_KERNEL(buffer_update, global_size, local_size); if(task->get_cancel() && cancel_time == DBL_MAX) { - /* Wait up to twice as many seconds for current samples to finish + /* Wait up to twice as many seconds for current samples to finish * to avoid artifacts in render result from ending too soon. */ cancel_time = time_dt() + 2.0 * time_multiplier; @@ -322,5 +322,3 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task, } CCL_NAMESPACE_END - - diff --git a/intern/cycles/device/device_split_kernel.h b/intern/cycles/device/device_split_kernel.h index 2ec0261e847..26ddce5bb22 100644 --- a/intern/cycles/device/device_split_kernel.h +++ b/intern/cycles/device/device_split_kernel.h @@ -131,6 +131,3 @@ public: CCL_NAMESPACE_END #endif /* __DEVICE_SPLIT_KERNEL_H__ */ - - - diff --git a/intern/cycles/device/device_task.cpp b/intern/cycles/device/device_task.cpp index 3c7d24fb5b7..8310863886c 100644 --- a/intern/cycles/device/device_task.cpp +++ b/intern/cycles/device/device_task.cpp @@ -126,4 +126,3 @@ void DeviceTask::update_progress(RenderTile *rtile, int pixel_samples) } CCL_NAMESPACE_END - diff --git a/intern/cycles/device/device_task.h b/intern/cycles/device/device_task.h index b9658eb978f..ec87aa8c560 100644 --- a/intern/cycles/device/device_task.h +++ b/intern/cycles/device/device_task.h @@ -86,4 +86,3 @@ protected: CCL_NAMESPACE_END #endif /* __DEVICE_TASK_H__ */ - diff --git a/intern/cycles/device/opencl/memory_manager.cpp b/intern/cycles/device/opencl/memory_manager.cpp index 75c9de65035..485a656cb83 100644 --- a/intern/cycles/device/opencl/memory_manager.cpp +++ b/intern/cycles/device/opencl/memory_manager.cpp @@ -254,4 +254,3 @@ void MemoryManager::set_kernel_arg_buffers(cl_kernel kernel, cl_uint *narg) CCL_NAMESPACE_END #endif /* WITH_OPENCL */ - diff --git a/intern/cycles/device/opencl/memory_manager.h b/intern/cycles/device/opencl/memory_manager.h index b3d861275f0..b49bd32dab6 100644 --- a/intern/cycles/device/opencl/memory_manager.h +++ b/intern/cycles/device/opencl/memory_manager.h @@ -104,4 +104,3 @@ public: }; CCL_NAMESPACE_END - diff --git a/intern/cycles/doc/license/Apache_2.0.txt b/intern/cycles/doc/license/Apache_2.0.txt index 6b0b1270ff0..d6456956733 100644 --- a/intern/cycles/doc/license/Apache_2.0.txt +++ b/intern/cycles/doc/license/Apache_2.0.txt @@ -200,4 +200,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - diff --git a/intern/cycles/doc/license/ILM.txt b/intern/cycles/doc/license/ILM.txt index 0e24aa56203..8b68abc954d 100644 --- a/intern/cycles/doc/license/ILM.txt +++ b/intern/cycles/doc/license/ILM.txt @@ -13,7 +13,7 @@ met: distribution. * Neither the name of Industrial Light & Magic nor the names of its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. + from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -26,4 +26,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/intern/cycles/doc/license/NVidia.txt b/intern/cycles/doc/license/NVidia.txt index 4fa55d3d2bc..42c165e11d2 100644 --- a/intern/cycles/doc/license/NVidia.txt +++ b/intern/cycles/doc/license/NVidia.txt @@ -33,4 +33,3 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - diff --git a/intern/cycles/doc/license/OSL.txt b/intern/cycles/doc/license/OSL.txt index 1ffeb58291e..e716b5c5e10 100644 --- a/intern/cycles/doc/license/OSL.txt +++ b/intern/cycles/doc/license/OSL.txt @@ -25,4 +25,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/intern/cycles/doc/license/Sobol.txt b/intern/cycles/doc/license/Sobol.txt index 4ad42d22fb1..0bce8349fe5 100644 --- a/intern/cycles/doc/license/Sobol.txt +++ b/intern/cycles/doc/license/Sobol.txt @@ -26,4 +26,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/intern/cycles/doc/license/readme.txt b/intern/cycles/doc/license/readme.txt index 4c56c90a0f1..cc5476e3511 100644 --- a/intern/cycles/doc/license/readme.txt +++ b/intern/cycles/doc/license/readme.txt @@ -13,4 +13,3 @@ MIT license Boost License * Boost and OpenCL dynamic loading - diff --git a/intern/cycles/graph/node.cpp b/intern/cycles/graph/node.cpp index b16c6af5d0e..45ffc8d7d6b 100644 --- a/intern/cycles/graph/node.cpp +++ b/intern/cycles/graph/node.cpp @@ -496,4 +496,3 @@ void Node::hash(MD5Hash& md5) } CCL_NAMESPACE_END - diff --git a/intern/cycles/graph/node.h b/intern/cycles/graph/node.h index d198c38be32..a738bfe197e 100644 --- a/intern/cycles/graph/node.h +++ b/intern/cycles/graph/node.h @@ -97,4 +97,3 @@ struct Node }; CCL_NAMESPACE_END - diff --git a/intern/cycles/graph/node_enum.h b/intern/cycles/graph/node_enum.h index 4e40c294f4f..9de776ddb55 100644 --- a/intern/cycles/graph/node_enum.h +++ b/intern/cycles/graph/node_enum.h @@ -45,4 +45,3 @@ private: }; CCL_NAMESPACE_END - diff --git a/intern/cycles/graph/node_type.cpp b/intern/cycles/graph/node_type.cpp index 37aae211e93..671ae2d815a 100644 --- a/intern/cycles/graph/node_type.cpp +++ b/intern/cycles/graph/node_type.cpp @@ -217,4 +217,3 @@ const NodeType *NodeType::find(ustring name) } CCL_NAMESPACE_END - diff --git a/intern/cycles/graph/node_type.h b/intern/cycles/graph/node_type.h index 15d34a79bb8..d4e2dbceff6 100644 --- a/intern/cycles/graph/node_type.h +++ b/intern/cycles/graph/node_type.h @@ -263,4 +263,3 @@ const NodeType *structname::register_type() { type->register_output(ustring(#name), ustring(ui_name), SocketType::ENUM); } CCL_NAMESPACE_END - diff --git a/intern/cycles/graph/node_xml.cpp b/intern/cycles/graph/node_xml.cpp index f4599e22d40..b7a28b427e5 100644 --- a/intern/cycles/graph/node_xml.cpp +++ b/intern/cycles/graph/node_xml.cpp @@ -458,4 +458,3 @@ xml_node xml_write_node(Node *node, xml_node xml_root) } CCL_NAMESPACE_END - diff --git a/intern/cycles/graph/node_xml.h b/intern/cycles/graph/node_xml.h index b648c9666c1..5fecf40f96c 100644 --- a/intern/cycles/graph/node_xml.h +++ b/intern/cycles/graph/node_xml.h @@ -32,4 +32,3 @@ void xml_read_node(XMLReader& reader, Node *node, xml_node xml_node); xml_node xml_write_node(Node *node, xml_node xml_root); CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h index c1b02cd4be1..f191b812f11 100644 --- a/intern/cycles/kernel/closure/bsdf.h +++ b/intern/cycles/kernel/closure/bsdf.h @@ -486,4 +486,3 @@ ccl_device bool bsdf_merge(ShaderClosure *a, ShaderClosure *b) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h b/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h index b6c896c754b..ff238b7a834 100644 --- a/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h +++ b/intern/cycles/kernel/closure/bsdf_ashikhmin_shirley.h @@ -117,7 +117,7 @@ ccl_device_forceinline float3 bsdf_ashikhmin_shirley_eval_reflect( lobe = 1.0f; } float norm = sqrtf((n_x + 1.0f)*(n_y + 1.0f)) / (8.0f * M_PI_F); - + out = NdotO * norm * lobe * pump; *pdf = norm * lobe / HdotI; } diff --git a/intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h b/intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h index a5ba2cb2972..b0bdea723b9 100644 --- a/intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h +++ b/intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -46,7 +46,7 @@ ccl_device int bsdf_ashikhmin_velvet_setup(VelvetBsdf *bsdf) { float sigma = fmaxf(bsdf->sigma, 0.01f); bsdf->invsigma2 = 1.0f/(sigma * sigma); - + bsdf->type = CLOSURE_BSDF_ASHIKHMIN_VELVET_ID; return SD_BSDF|SD_BSDF_HAS_EVAL; @@ -159,4 +159,3 @@ ccl_device int bsdf_ashikhmin_velvet_sample(const ShaderClosure *sc, float3 Ng, CCL_NAMESPACE_END #endif /* __BSDF_ASHIKHMIN_VELVET_H__ */ - diff --git a/intern/cycles/kernel/closure/bsdf_diffuse.h b/intern/cycles/kernel/closure/bsdf_diffuse.h index ec6f1f20996..ee6d4cdf2df 100644 --- a/intern/cycles/kernel/closure/bsdf_diffuse.h +++ b/intern/cycles/kernel/closure/bsdf_diffuse.h @@ -88,7 +88,7 @@ ccl_device int bsdf_diffuse_sample(const ShaderClosure *sc, float3 Ng, float3 I, } else *pdf = 0.0f; - + return LABEL_REFLECT|LABEL_DIFFUSE; } @@ -140,4 +140,3 @@ ccl_device int bsdf_translucent_sample(const ShaderClosure *sc, float3 Ng, float CCL_NAMESPACE_END #endif /* __BSDF_DIFFUSE_H__ */ - diff --git a/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h b/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h index 24f40af46a3..35bb2fdf0e8 100644 --- a/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h +++ b/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h @@ -46,7 +46,7 @@ typedef ccl_addr_space struct DiffuseRampBsdf { ccl_device float3 bsdf_diffuse_ramp_get_color(const float3 colors[8], float pos) { int MAXCOLORS = 8; - + float npos = pos * (float)(MAXCOLORS - 1); int ipos = float_to_int(npos); if(ipos < 0) @@ -99,7 +99,7 @@ ccl_device int bsdf_diffuse_ramp_sample(const ShaderClosure *sc, float3 Ng, floa } else *pdf = 0.0f; - + return LABEL_REFLECT|LABEL_DIFFUSE; } diff --git a/intern/cycles/kernel/closure/bsdf_hair.h b/intern/cycles/kernel/closure/bsdf_hair.h index daaa26dc6ad..7b44a23f05b 100644 --- a/intern/cycles/kernel/closure/bsdf_hair.h +++ b/intern/cycles/kernel/closure/bsdf_hair.h @@ -278,4 +278,3 @@ ccl_device int bsdf_hair_transmission_sample(const ShaderClosure *sc, float3 Ng, CCL_NAMESPACE_END #endif /* __BSDF_HAIR_H__ */ - diff --git a/intern/cycles/kernel/closure/bsdf_microfacet.h b/intern/cycles/kernel/closure/bsdf_microfacet.h index 2dd59354058..e74d5ebaa42 100644 --- a/intern/cycles/kernel/closure/bsdf_microfacet.h +++ b/intern/cycles/kernel/closure/bsdf_microfacet.h @@ -231,7 +231,7 @@ ccl_device_forceinline float3 microfacet_sample_stretched( /* 5. compute normal */ return normalize(make_float3(-slope_x, -slope_y, 1.0f)); -} +} /* Calculate the reflection color * @@ -434,7 +434,7 @@ ccl_device float3 bsdf_microfacet_ggx_eval_reflect(const ShaderClosure *sc, cons /* eq. 34: now calculate G1(i,m) and G1(o,m) */ G1o = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNO * cosNO) / (cosNO * cosNO))); - G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); + G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); } else { /* anisotropic */ @@ -535,7 +535,7 @@ ccl_device float3 bsdf_microfacet_ggx_eval_transmit(const ShaderClosure *sc, con /* eq. 34: now calculate G1(i,m) and G1(o,m) */ G1o = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNO * cosNO) / (cosNO * cosNO))); - G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); + G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); float G = G1o * G1i; @@ -706,7 +706,7 @@ ccl_device int bsdf_microfacet_ggx_sample(KernelGlobals *kg, const ShaderClosure dIdx, dIdy, &dRdx, &dRdy, &dTdx, &dTdy, #endif &inside); - + if(!inside && fresnel != 1.0f) { *omega_in = T; @@ -733,7 +733,7 @@ ccl_device int bsdf_microfacet_ggx_sample(KernelGlobals *kg, const ShaderClosure float cosNI = dot(N, *omega_in); /* eq. 34: now calculate G1(i,m) */ - float G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); + float G1i = 2 / (1 + safe_sqrtf(1 + alpha2 * (1 - cosNI * cosNI) / (cosNI * cosNI))); /* eq. 21 */ float cosHI = dot(m, *omega_in); @@ -1125,4 +1125,3 @@ ccl_device int bsdf_microfacet_beckmann_sample(KernelGlobals *kg, const ShaderCl CCL_NAMESPACE_END #endif /* __BSDF_MICROFACET_H__ */ - diff --git a/intern/cycles/kernel/closure/bsdf_phong_ramp.h b/intern/cycles/kernel/closure/bsdf_phong_ramp.h index 420f94755ee..91c7803346d 100644 --- a/intern/cycles/kernel/closure/bsdf_phong_ramp.h +++ b/intern/cycles/kernel/closure/bsdf_phong_ramp.h @@ -47,7 +47,7 @@ typedef ccl_addr_space struct PhongRampBsdf { ccl_device float3 bsdf_phong_ramp_get_color(const float3 colors[8], float pos) { int MAXCOLORS = 8; - + float npos = pos * (float)(MAXCOLORS - 1); int ipos = float_to_int(npos); if(ipos < 0) @@ -71,7 +71,7 @@ ccl_device float3 bsdf_phong_ramp_eval_reflect(const ShaderClosure *sc, const fl float m_exponent = bsdf->exponent; float cosNI = dot(bsdf->N, omega_in); float cosNO = dot(bsdf->N, I); - + if(cosNI > 0 && cosNO > 0) { // reflect the view vector float3 R = (2 * cosNO) * bsdf->N - I; @@ -84,7 +84,7 @@ ccl_device float3 bsdf_phong_ramp_eval_reflect(const ShaderClosure *sc, const fl return bsdf_phong_ramp_get_color(bsdf->colors, cosp) * out; } } - + return make_float3(0.0f, 0.0f, 0.0f); } @@ -98,7 +98,7 @@ ccl_device int bsdf_phong_ramp_sample(const ShaderClosure *sc, float3 Ng, float3 const PhongRampBsdf *bsdf = (const PhongRampBsdf*)sc; float cosNO = dot(bsdf->N, I); float m_exponent = bsdf->exponent; - + if(cosNO > 0) { // reflect the view vector float3 R = (2 * cosNO) * bsdf->N - I; @@ -107,7 +107,7 @@ ccl_device int bsdf_phong_ramp_sample(const ShaderClosure *sc, float3 Ng, float3 *domega_in_dx = (2 * dot(bsdf->N, dIdx)) * bsdf->N - dIdx; *domega_in_dy = (2 * dot(bsdf->N, dIdy)) * bsdf->N - dIdy; #endif - + float3 T, B; make_orthonormals (R, &T, &B); float phi = M_2PI_F * randu; diff --git a/intern/cycles/kernel/closure/bsdf_principled_diffuse.h b/intern/cycles/kernel/closure/bsdf_principled_diffuse.h index f8ca64293b0..83be2b35a00 100644 --- a/intern/cycles/kernel/closure/bsdf_principled_diffuse.h +++ b/intern/cycles/kernel/closure/bsdf_principled_diffuse.h @@ -123,5 +123,3 @@ ccl_device int bsdf_principled_diffuse_sample(const ShaderClosure *sc, CCL_NAMESPACE_END #endif /* __BSDF_PRINCIPLED_DIFFUSE_H__ */ - - diff --git a/intern/cycles/kernel/closure/bsdf_principled_sheen.h b/intern/cycles/kernel/closure/bsdf_principled_sheen.h index f4476bfecd0..8b7c4399516 100644 --- a/intern/cycles/kernel/closure/bsdf_principled_sheen.h +++ b/intern/cycles/kernel/closure/bsdf_principled_sheen.h @@ -109,5 +109,3 @@ ccl_device int bsdf_principled_sheen_sample(const ShaderClosure *sc, CCL_NAMESPACE_END #endif /* __BSDF_PRINCIPLED_SHEEN_H__ */ - - diff --git a/intern/cycles/kernel/closure/bsdf_reflection.h b/intern/cycles/kernel/closure/bsdf_reflection.h index 1d21614ecee..b33b6e3597b 100644 --- a/intern/cycles/kernel/closure/bsdf_reflection.h +++ b/intern/cycles/kernel/closure/bsdf_reflection.h @@ -78,4 +78,3 @@ ccl_device int bsdf_reflection_sample(const ShaderClosure *sc, float3 Ng, float3 CCL_NAMESPACE_END #endif /* __BSDF_REFLECTION_H__ */ - diff --git a/intern/cycles/kernel/closure/bsdf_refraction.h b/intern/cycles/kernel/closure/bsdf_refraction.h index 050a4e76fa9..b181650e928 100644 --- a/intern/cycles/kernel/closure/bsdf_refraction.h +++ b/intern/cycles/kernel/closure/bsdf_refraction.h @@ -87,4 +87,3 @@ ccl_device int bsdf_refraction_sample(const ShaderClosure *sc, float3 Ng, float3 CCL_NAMESPACE_END #endif /* __BSDF_REFRACTION_H__ */ - diff --git a/intern/cycles/kernel/closure/bsdf_toon.h b/intern/cycles/kernel/closure/bsdf_toon.h index d8b6d8ddead..6d8074b7130 100644 --- a/intern/cycles/kernel/closure/bsdf_toon.h +++ b/intern/cycles/kernel/closure/bsdf_toon.h @@ -73,7 +73,7 @@ ccl_device float3 bsdf_toon_get_intensity(float max_angle, float smooth, float a is = (1.0f - (angle - max_angle)/smooth); else is = 0.0f; - + return make_float3(is, is, is); } @@ -90,7 +90,7 @@ ccl_device float3 bsdf_diffuse_toon_eval_reflect(const ShaderClosure *sc, const float angle = safe_acosf(fmaxf(dot(bsdf->N, omega_in), 0.0f)); float3 eval = bsdf_toon_get_intensity(max_angle, smooth, angle); - + if(eval.x > 0.0f) { float sample_angle = bsdf_toon_get_sample_angle(max_angle, smooth); @@ -152,7 +152,7 @@ ccl_device float3 bsdf_glossy_toon_eval_reflect(const ShaderClosure *sc, const f float smooth = bsdf->smooth*M_PI_2_F; float cosNI = dot(bsdf->N, omega_in); float cosNO = dot(bsdf->N, I); - + if(cosNI > 0 && cosNO > 0) { /* reflect the view vector */ float3 R = (2 * cosNO) * bsdf->N - I; @@ -166,7 +166,7 @@ ccl_device float3 bsdf_glossy_toon_eval_reflect(const ShaderClosure *sc, const f *pdf = 0.5f * M_1_PI_F / (1.0f - cosf(sample_angle)); return *pdf * eval; } - + return make_float3(0.0f, 0.0f, 0.0f); } @@ -181,7 +181,7 @@ ccl_device int bsdf_glossy_toon_sample(const ShaderClosure *sc, float3 Ng, float float max_angle = bsdf->size*M_PI_2_F; float smooth = bsdf->smooth*M_PI_2_F; float cosNO = dot(bsdf->N, I); - + if(cosNO > 0) { /* reflect the view vector */ float3 R = (2 * cosNO) * bsdf->N - I; @@ -216,4 +216,3 @@ ccl_device int bsdf_glossy_toon_sample(const ShaderClosure *sc, float3 Ng, float CCL_NAMESPACE_END #endif /* __BSDF_TOON_H__ */ - diff --git a/intern/cycles/kernel/closure/bsdf_transparent.h b/intern/cycles/kernel/closure/bsdf_transparent.h index 8fc7ef4dd4f..f788dbcd0ff 100644 --- a/intern/cycles/kernel/closure/bsdf_transparent.h +++ b/intern/cycles/kernel/closure/bsdf_transparent.h @@ -107,4 +107,3 @@ ccl_device int bsdf_transparent_sample(const ShaderClosure *sc, float3 Ng, float CCL_NAMESPACE_END #endif /* __BSDF_TRANSPARENT_H__ */ - diff --git a/intern/cycles/kernel/closure/bsdf_util.h b/intern/cycles/kernel/closure/bsdf_util.h index 3dc15d5791c..b080e025d16 100644 --- a/intern/cycles/kernel/closure/bsdf_util.h +++ b/intern/cycles/kernel/closure/bsdf_util.h @@ -62,14 +62,14 @@ ccl_device float fresnel_dielectric( Nn = -N; *is_inside = true; } - + // compute reflection *R = (2 * cos)* Nn - I; #ifdef __RAY_DIFFERENTIALS__ *dRdx = (2 * dot(Nn, dIdx)) * Nn - dIdx; *dRdy = (2 * dot(Nn, dIdy)) * Nn - dIdy; #endif - + float arg = 1 -(neta * neta *(1 -(cos * cos))); if(arg < 0) { *T = make_float3(0.0f, 0.0f, 0.0f); @@ -159,4 +159,3 @@ ccl_device_forceinline float3 interpolate_fresnel_color(float3 L, float3 H, floa CCL_NAMESPACE_END #endif /* __BSDF_UTIL_H__ */ - diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h index 8578767b07e..ba0c6ae8c61 100644 --- a/intern/cycles/kernel/closure/bssrdf.h +++ b/intern/cycles/kernel/closure/bssrdf.h @@ -500,4 +500,3 @@ ccl_device_forceinline float bssrdf_pdf(const ShaderClosure *sc, float r) CCL_NAMESPACE_END #endif /* __KERNEL_BSSRDF_H__ */ - diff --git a/intern/cycles/kernel/closure/emissive.h b/intern/cycles/kernel/closure/emissive.h index e709ca9a372..a7f4a2a7327 100644 --- a/intern/cycles/kernel/closure/emissive.h +++ b/intern/cycles/kernel/closure/emissive.h @@ -76,9 +76,8 @@ ccl_device void emissive_sample(const float3 Ng, float randu, float randv, ccl_device float3 emissive_simple_eval(const float3 Ng, const float3 I) { float res = emissive_pdf(Ng, I); - + return make_float3(res, res, res); } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/closure/volume.h b/intern/cycles/kernel/closure/volume.h index da791e9aa73..872d06c936a 100644 --- a/intern/cycles/kernel/closure/volume.h +++ b/intern/cycles/kernel/closure/volume.h @@ -51,7 +51,7 @@ ccl_device float single_peaked_henyey_greenstein(float cos_theta, float g) ccl_device int volume_henyey_greenstein_setup(HenyeyGreensteinVolume *volume) { volume->type = CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID; - + /* clamp anisotropy to avoid delta function */ volume->g = signf(volume->g) * min(fabsf(volume->g), 1.0f - 1e-3f); diff --git a/intern/cycles/kernel/geom/geom.h b/intern/cycles/kernel/geom/geom.h index f34b77ebc07..e81c1b781c8 100644 --- a/intern/cycles/kernel/geom/geom.h +++ b/intern/cycles/kernel/geom/geom.h @@ -30,4 +30,3 @@ #include "kernel/geom/geom_curve_intersect.h" #include "kernel/geom/geom_volume.h" #include "kernel/geom/geom_primitive.h" - diff --git a/intern/cycles/kernel/geom/geom_attribute.h b/intern/cycles/kernel/geom/geom_attribute.h index 42c053704d5..e991f3d685a 100644 --- a/intern/cycles/kernel/geom/geom_attribute.h +++ b/intern/cycles/kernel/geom/geom_attribute.h @@ -66,7 +66,7 @@ ccl_device_inline AttributeDescriptor find_attribute(KernelGlobals *kg, const Sh uint attr_offset = object_attribute_map_offset(kg, sd->object); attr_offset += attribute_primitive_type(kg, sd); uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset); - + while(attr_map.x != id) { if(UNLIKELY(attr_map.x == ATTR_STD_NONE)) { return attribute_not_found(); @@ -77,7 +77,7 @@ ccl_device_inline AttributeDescriptor find_attribute(KernelGlobals *kg, const Sh AttributeDescriptor desc; desc.element = (AttributeElement)attr_map.y; - + if(sd->prim == PRIM_NONE && desc.element != ATTR_ELEMENT_MESH && desc.element != ATTR_ELEMENT_VOXEL && @@ -108,4 +108,3 @@ ccl_device Transform primitive_attribute_matrix(KernelGlobals *kg, const ShaderD } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/geom/geom_motion_curve.h b/intern/cycles/kernel/geom/geom_motion_curve.h index fad29e431ec..5cc22ae2155 100644 --- a/intern/cycles/kernel/geom/geom_motion_curve.h +++ b/intern/cycles/kernel/geom/geom_motion_curve.h @@ -214,4 +214,3 @@ ccl_device_inline void motion_cardinal_curve_keys_avx(KernelGlobals *kg, #endif CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/geom/geom_motion_triangle.h b/intern/cycles/kernel/geom/geom_motion_triangle.h index 7ac6807e749..64f6d027b99 100644 --- a/intern/cycles/kernel/geom/geom_motion_triangle.h +++ b/intern/cycles/kernel/geom/geom_motion_triangle.h @@ -34,14 +34,14 @@ ccl_device_inline int find_attribute_motion(KernelGlobals *kg, int object, uint /* todo: find a better (faster) solution for this, maybe store offset per object */ uint attr_offset = object_attribute_map_offset(kg, object); uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset); - + while(attr_map.x != id) { attr_offset += ATTR_PRIM_TYPES; attr_map = kernel_tex_fetch(__attributes_map, attr_offset); } *elem = (AttributeElement)attr_map.y; - + /* return result */ return (attr_map.y == ATTR_ELEMENT_NONE) ? (int)ATTR_STD_NOT_FOUND : (int)attr_map.z; } diff --git a/intern/cycles/kernel/geom/geom_motion_triangle_shader.h b/intern/cycles/kernel/geom/geom_motion_triangle_shader.h index 4789137d5b0..e91a4be96ba 100644 --- a/intern/cycles/kernel/geom/geom_motion_triangle_shader.h +++ b/intern/cycles/kernel/geom/geom_motion_triangle_shader.h @@ -120,4 +120,3 @@ ccl_device_noinline void motion_triangle_shader_setup(KernelGlobals *kg, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/geom/geom_object.h b/intern/cycles/kernel/geom/geom_object.h index 800649abf38..cfe17e63627 100644 --- a/intern/cycles/kernel/geom/geom_object.h +++ b/intern/cycles/kernel/geom/geom_object.h @@ -613,4 +613,3 @@ ccl_device_inline void object_normal_transform_addrspace(KernelGlobals *kg, #endif CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/geom/geom_patch.h b/intern/cycles/kernel/geom/geom_patch.h index 5663b598508..343649ad934 100644 --- a/intern/cycles/kernel/geom/geom_patch.h +++ b/intern/cycles/kernel/geom/geom_patch.h @@ -340,4 +340,3 @@ ccl_device float3 patch_eval_uchar4(KernelGlobals *kg, const ShaderData *sd, int } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/geom/geom_primitive.h b/intern/cycles/kernel/geom/geom_primitive.h index c159be92885..6db8475d196 100644 --- a/intern/cycles/kernel/geom/geom_primitive.h +++ b/intern/cycles/kernel/geom/geom_primitive.h @@ -192,7 +192,7 @@ ccl_device_inline float4 primitive_motion_vector(KernelGlobals *kg, ShaderData * /* object motion. note that depending on the mesh having motion vectors, this * transformation was set match the world/object space of motion_pre/post */ Transform tfm; - + tfm = object_fetch_motion_pass_transform(kg, sd->object, OBJECT_PASS_MOTION_PRE); motion_pre = transform_point(&tfm, motion_pre); @@ -240,4 +240,3 @@ ccl_device_inline float4 primitive_motion_vector(KernelGlobals *kg, ShaderData * } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/geom/geom_subd_triangle.h b/intern/cycles/kernel/geom/geom_subd_triangle.h index 044e82f03d4..00ce89ae567 100644 --- a/intern/cycles/kernel/geom/geom_subd_triangle.h +++ b/intern/cycles/kernel/geom/geom_subd_triangle.h @@ -352,4 +352,3 @@ ccl_device_noinline float3 subd_triangle_attribute_float3(KernelGlobals *kg, con } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/geom/geom_volume.h b/intern/cycles/kernel/geom/geom_volume.h index 346f228e961..688413b74a1 100644 --- a/intern/cycles/kernel/geom/geom_volume.h +++ b/intern/cycles/kernel/geom/geom_volume.h @@ -80,4 +80,3 @@ ccl_device float3 volume_attribute_float3(KernelGlobals *kg, const ShaderData *s #endif CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel.h b/intern/cycles/kernel/kernel.h index cfb35dd33f5..373324afb01 100644 --- a/intern/cycles/kernel/kernel.h +++ b/intern/cycles/kernel/kernel.h @@ -64,4 +64,3 @@ void kernel_tex_copy(KernelGlobals *kg, CCL_NAMESPACE_END #endif /* __KERNEL_H__ */ - diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h index c0f281cae97..6b3cec9fda6 100644 --- a/intern/cycles/kernel/kernel_accumulate.h +++ b/intern/cycles/kernel/kernel_accumulate.h @@ -270,7 +270,7 @@ ccl_device_inline void path_radiance_bsdf_bounce( L_state->transmission + L_state->subsurface + L_state->scatter; - + L_state->direct = *throughput; } else { diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h index 79e6d1b4862..afb63152830 100644 --- a/intern/cycles/kernel/kernel_bake.h +++ b/intern/cycles/kernel/kernel_bake.h @@ -563,4 +563,3 @@ ccl_device void kernel_background_evaluate(KernelGlobals *kg, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h index d26b668cb11..2f955741797 100644 --- a/intern/cycles/kernel/kernel_compat_cpu.h +++ b/intern/cycles/kernel/kernel_compat_cpu.h @@ -153,4 +153,3 @@ ccl_device_inline void print_sse3i(const char *label, sse3i& a) CCL_NAMESPACE_END #endif /* __KERNEL_COMPAT_CPU_H__ */ - diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h index 671c47e2225..438c819eec6 100644 --- a/intern/cycles/kernel/kernel_compat_opencl.h +++ b/intern/cycles/kernel/kernel_compat_opencl.h @@ -154,4 +154,3 @@ #include "util/util_types.h" #endif /* __KERNEL_COMPAT_OPENCL_H__ */ - diff --git a/intern/cycles/kernel/kernel_differential.h b/intern/cycles/kernel/kernel_differential.h index ae1e70f0167..924d96c72e5 100644 --- a/intern/cycles/kernel/kernel_differential.h +++ b/intern/cycles/kernel/kernel_differential.h @@ -103,4 +103,3 @@ ccl_device differential3 differential3_zero() } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h index 524e2467ebc..302bb047647 100644 --- a/intern/cycles/kernel/kernel_emission.h +++ b/intern/cycles/kernel/kernel_emission.h @@ -76,7 +76,7 @@ ccl_device_noinline float3 direct_emissive_eval(KernelGlobals *kg, /* Evaluate emissive closure. */ eval = shader_emissive_eval(kg, emission_sd); } - + eval *= ls->eval_fac; return eval; @@ -338,4 +338,3 @@ ccl_device_noinline float3 indirect_background(KernelGlobals *kg, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_film.h b/intern/cycles/kernel/kernel_film.h index 94815601179..b5f151d8663 100644 --- a/intern/cycles/kernel/kernel_film.h +++ b/intern/cycles/kernel/kernel_film.h @@ -87,4 +87,3 @@ ccl_device void kernel_film_convert_to_half_float(KernelGlobals *kg, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_jitter.h b/intern/cycles/kernel/kernel_jitter.h index f5855757d3f..3bde96b078c 100644 --- a/intern/cycles/kernel/kernel_jitter.h +++ b/intern/cycles/kernel/kernel_jitter.h @@ -226,4 +226,3 @@ ccl_device void cmj_sample_2D(int s, int N, int p, float *fx, float *fy) #endif CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_montecarlo.h b/intern/cycles/kernel/kernel_montecarlo.h index 9995490505f..49dc1f08cc1 100644 --- a/intern/cycles/kernel/kernel_montecarlo.h +++ b/intern/cycles/kernel/kernel_montecarlo.h @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h index a42a8e9812f..458aa6c2a97 100644 --- a/intern/cycles/kernel/kernel_passes.h +++ b/intern/cycles/kernel/kernel_passes.h @@ -203,7 +203,7 @@ ccl_device_inline void kernel_write_data_passes(KernelGlobals *kg, ccl_global fl if(!((flag | light_flag) & PASS_ANY)) return; - + if(!(path_flag & PATH_RAY_SINGLE_PASS_DONE)) { if(!(sd->flag & SD_TRANSPARENT) || kernel_data.film.pass_alpha_threshold == 0.0f || @@ -285,7 +285,7 @@ ccl_device_inline void kernel_write_light_passes(KernelGlobals *kg, ccl_global f if(!kernel_data.film.use_light_pass) return; - + if(light_flag & PASSMASK(DIFFUSE_INDIRECT)) kernel_write_pass_float3(buffer + kernel_data.film.pass_diffuse_indirect, L->indirect_diffuse); if(light_flag & PASSMASK(GLOSSY_INDIRECT)) @@ -392,4 +392,3 @@ ccl_device_inline void kernel_write_result(KernelGlobals *kg, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h index d79b556c2ce..5745762e183 100644 --- a/intern/cycles/kernel/kernel_path.h +++ b/intern/cycles/kernel/kernel_path.h @@ -762,4 +762,3 @@ ccl_device void kernel_path_trace(KernelGlobals *kg, #endif /* __SPLIT_KERNEL__ */ CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h index 8a358e51f94..b13fabde268 100644 --- a/intern/cycles/kernel/kernel_path_state.h +++ b/intern/cycles/kernel/kernel_path_state.h @@ -269,4 +269,3 @@ ccl_device_inline void path_state_branch(ccl_addr_space PathState *state, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_path_subsurface.h b/intern/cycles/kernel/kernel_path_subsurface.h index 71aea9e3b27..ff4a8a9d580 100644 --- a/intern/cycles/kernel/kernel_path_subsurface.h +++ b/intern/cycles/kernel/kernel_path_subsurface.h @@ -152,4 +152,3 @@ ccl_device void kernel_path_subsurface_setup_indirect( #endif /* __SUBSURFACE__ */ CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_path_surface.h b/intern/cycles/kernel/kernel_path_surface.h index 27be90d5059..c9202ccb16d 100644 --- a/intern/cycles/kernel/kernel_path_surface.h +++ b/intern/cycles/kernel/kernel_path_surface.h @@ -356,4 +356,3 @@ ccl_device bool kernel_path_surface_bounce(KernelGlobals *kg, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_path_volume.h b/intern/cycles/kernel/kernel_path_volume.h index 6275d0d6562..feaea15d3c4 100644 --- a/intern/cycles/kernel/kernel_path_volume.h +++ b/intern/cycles/kernel/kernel_path_volume.h @@ -85,7 +85,7 @@ bool kernel_path_volume_bounce( if(phase_pdf == 0.0f || bsdf_eval_is_zero(&phase_eval)) return false; - + /* modify throughput */ path_radiance_bsdf_bounce(kg, L_state, throughput, &phase_eval, phase_pdf, state->bounce, label); @@ -223,7 +223,7 @@ ccl_device void kernel_branched_path_volume_connect_light( VolumeIntegrateResult result = kernel_volume_decoupled_scatter(kg, state, ray, sd, &tp, rphase, rscatter, segment, (ls.t != FLT_MAX)? &ls.P: NULL, false); - + /* todo: split up light_sample so we don't have to call it again with new position */ if(result == VOLUME_PATH_SCATTERED && light_sample(kg, light_u, light_v, sd->time, sd->P, state->bounce, &ls)) { @@ -260,7 +260,7 @@ ccl_device void kernel_branched_path_volume_connect_light( VolumeIntegrateResult result = kernel_volume_decoupled_scatter(kg, state, ray, sd, &tp, rphase, rscatter, segment, (ls.t != FLT_MAX)? &ls.P: NULL, false); - + /* todo: split up light_sample so we don't have to call it again with new position */ if(result == VOLUME_PATH_SCATTERED && light_sample(kg, light_u, light_v, sd->time, sd->P, state->bounce, &ls)) { @@ -284,4 +284,3 @@ ccl_device void kernel_branched_path_volume_connect_light( #endif /* __VOLUME_SCATTER__ */ CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_projection.h b/intern/cycles/kernel/kernel_projection.h index 4540d733af4..7bad89c831c 100644 --- a/intern/cycles/kernel/kernel_projection.h +++ b/intern/cycles/kernel/kernel_projection.h @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h index 93152e9ff1c..b33e4eba8a4 100644 --- a/intern/cycles/kernel/kernel_random.h +++ b/intern/cycles/kernel/kernel_random.h @@ -296,4 +296,3 @@ ccl_device float lcg_step_float_addrspace(ccl_addr_space uint *rng) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h index e8553d84547..a06fbe72ffa 100644 --- a/intern/cycles/kernel/kernel_subsurface.h +++ b/intern/cycles/kernel/kernel_subsurface.h @@ -50,7 +50,7 @@ ccl_device_inline float3 subsurface_scatter_eval(ShaderData *sd, for(int i = 0; i < sd->num_closure; i++) { sc = &sd->closure[i]; - + if(CLOSURE_IS_DISK_BSSRDF(sc->type)) { /* in case of branched path integrate we sample all bssrdf's once, * for path trace we pick one, so adjust pdf for that */ @@ -533,4 +533,3 @@ ccl_device_inline int subsurface_scatter_multi_intersect( } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/kernel_textures.h b/intern/cycles/kernel/kernel_textures.h index a7b8c492ee9..e83727ec64e 100644 --- a/intern/cycles/kernel/kernel_textures.h +++ b/intern/cycles/kernel/kernel_textures.h @@ -85,4 +85,3 @@ KERNEL_TEX(TextureInfo, __texture_info) KERNEL_TEX(float, __ies) #undef KERNEL_TEX - diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index c2a65dc9999..69ee66b3dd5 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -1238,19 +1238,19 @@ typedef struct KernelFilm { int pass_glossy_color; int pass_transmission_color; int pass_subsurface_color; - + int pass_diffuse_indirect; int pass_glossy_indirect; int pass_transmission_indirect; int pass_subsurface_indirect; int pass_volume_indirect; - + int pass_diffuse_direct; int pass_glossy_direct; int pass_transmission_direct; int pass_subsurface_direct; int pass_volume_direct; - + int pass_emission; int pass_background; int pass_ao; @@ -1671,4 +1671,3 @@ typedef struct WorkTile { CCL_NAMESPACE_END #endif /* __KERNEL_TYPES_H__ */ - diff --git a/intern/cycles/kernel/kernel_volume.h b/intern/cycles/kernel/kernel_volume.h index 58032545338..a7072c3ad03 100644 --- a/intern/cycles/kernel/kernel_volume.h +++ b/intern/cycles/kernel/kernel_volume.h @@ -68,7 +68,7 @@ ccl_device_inline bool volume_shader_sample(KernelGlobals *kg, if(!(sd->flag & (SD_EXTINCTION|SD_SCATTER|SD_EMISSION))) return false; - + coeff->sigma_s = make_float3(0.0f, 0.0f, 0.0f); coeff->sigma_t = (sd->flag & SD_EXTINCTION)? sd->closure_transparent_extinction: make_float3(0.0f, 0.0f, 0.0f); @@ -368,7 +368,7 @@ ccl_device float3 kernel_volume_emission_integrate(VolumeShaderCoefficients *coe } else emission *= t; - + return emission; } @@ -475,7 +475,7 @@ ccl_device VolumeIntegrateResult kernel_volume_integrate_homogeneous( new_tp = *throughput * transmittance / pdf; } } - else + else #endif if(closure_flag & SD_EXTINCTION) { /* absorption only, no sampling needed */ @@ -596,7 +596,7 @@ ccl_device VolumeIntegrateResult kernel_volume_integrate_heterogeneous_distance( xi = 1.0f - (1.0f - xi)/sample_transmittance; } } - else + else #endif if(closure_flag & SD_EXTINCTION) { /* absorption only, no sampling needed */ @@ -751,7 +751,7 @@ ccl_device void kernel_volume_decoupled_record(KernelGlobals *kg, PathState *sta step_offset = 0.0f; segment->steps = &segment->stack_step; } - + /* init accumulation variables */ float3 accum_emission = make_float3(0.0f, 0.0f, 0.0f); float3 accum_transmittance = make_float3(1.0f, 1.0f, 1.0f); @@ -1263,7 +1263,7 @@ ccl_device void kernel_volume_stack_enter_exit(KernelGlobals *kg, ShaderData *sd if(!(sd->flag & SD_HAS_VOLUME)) return; - + if(sd->flag & SD_BACKFACING) { /* exit volume object: remove from stack */ for(int i = 0; stack[i].shader != SHADER_NONE; i++) { diff --git a/intern/cycles/kernel/kernels/cpu/kernel_split.cpp b/intern/cycles/kernel/kernels/cpu/kernel_split.cpp index ca750e5a00d..c5e199b0a69 100644 --- a/intern/cycles/kernel/kernels/cpu/kernel_split.cpp +++ b/intern/cycles/kernel/kernels/cpu/kernel_split.cpp @@ -60,4 +60,3 @@ #include "kernel/kernel.h" #define KERNEL_ARCH cpu #include "kernel/kernels/cpu/kernel_cpu_impl.h" - diff --git a/intern/cycles/kernel/kernels/cuda/kernel_config.h b/intern/cycles/kernel/kernels/cuda/kernel_config.h index f3d0d721c5c..3808898c5ca 100644 --- a/intern/cycles/kernel/kernels/cuda/kernel_config.h +++ b/intern/cycles/kernel/kernels/cuda/kernel_config.h @@ -106,4 +106,3 @@ #if CUDA_KERNEL_BRANCHED_MAX_REGISTERS > CUDA_THREAD_MAX_REGISTERS # error "Maximum number of registers per thread exceeded" #endif - diff --git a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h index a72fae5e1b1..37cfbbcb235 100644 --- a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h +++ b/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h @@ -188,4 +188,3 @@ ccl_device float4 kernel_tex_image_interp_3d(KernelGlobals *kg, int id, float x, return make_float4(f, f, f, 1.0f); } } - diff --git a/intern/cycles/kernel/kernels/opencl/kernel_split_function.h b/intern/cycles/kernel/kernels/opencl/kernel_split_function.h index 6aa7681cbed..05e1ddf6da2 100644 --- a/intern/cycles/kernel/kernels/opencl/kernel_split_function.h +++ b/intern/cycles/kernel/kernels/opencl/kernel_split_function.h @@ -62,4 +62,3 @@ __kernel void KERNEL_NAME_EVAL(kernel_ocl_path_trace, KERNEL_NAME)( #undef KERNEL_NAME_JOIN #undef KERNEL_NAME_EVAL - diff --git a/intern/cycles/kernel/osl/background.cpp b/intern/cycles/kernel/osl/background.cpp index 30a9e84c399..6924a4144c5 100644 --- a/intern/cycles/kernel/osl/background.cpp +++ b/intern/cycles/kernel/osl/background.cpp @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -96,4 +96,3 @@ ClosureParam *closure_holdout_params() CCLOSURE_PREPARE(closure_holdout_prepare, HoldoutClosure) CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp b/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp index ea18f2c8c86..ed5d5235a34 100644 --- a/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp +++ b/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -82,4 +82,3 @@ ClosureParam *closure_bsdf_diffuse_ramp_params() CCLOSURE_PREPARE(closure_bsdf_diffuse_ramp_prepare, DiffuseRampClosure) CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/osl/bsdf_phong_ramp.cpp b/intern/cycles/kernel/osl/bsdf_phong_ramp.cpp index a26671eb09e..a8acdb8e342 100644 --- a/intern/cycles/kernel/osl/bsdf_phong_ramp.cpp +++ b/intern/cycles/kernel/osl/bsdf_phong_ramp.cpp @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -82,4 +82,3 @@ ClosureParam *closure_bsdf_phong_ramp_params() CCLOSURE_PREPARE(closure_bsdf_phong_ramp_prepare, PhongRampClosure) CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/osl/emissive.cpp b/intern/cycles/kernel/osl/emissive.cpp index 6162786b527..c2a848231f2 100644 --- a/intern/cycles/kernel/osl/emissive.cpp +++ b/intern/cycles/kernel/osl/emissive.cpp @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -72,4 +72,3 @@ ClosureParam *closure_emission_params() CCLOSURE_PREPARE(closure_emission_prepare, GenericEmissiveClosure) CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/osl/osl_bssrdf.cpp b/intern/cycles/kernel/osl/osl_bssrdf.cpp index da7368bbc61..2ebfd5f0c2f 100644 --- a/intern/cycles/kernel/osl/osl_bssrdf.cpp +++ b/intern/cycles/kernel/osl/osl_bssrdf.cpp @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -132,4 +132,3 @@ ClosureParam *closure_bssrdf_params() CCLOSURE_PREPARE(closure_bssrdf_prepare, CBSSRDFClosure) CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/osl/osl_closures.cpp b/intern/cycles/kernel/osl/osl_closures.cpp index 6a1e52d7d16..581b38e65c0 100644 --- a/intern/cycles/kernel/osl/osl_closures.cpp +++ b/intern/cycles/kernel/osl/osl_closures.cpp @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -770,4 +770,3 @@ CCLOSURE_PREPARE(closure_henyey_greenstein_prepare, VolumeHenyeyGreensteinClosur CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/osl/osl_closures.h b/intern/cycles/kernel/osl/osl_closures.h index 68dfa9a4650..857cc84afd2 100644 --- a/intern/cycles/kernel/osl/osl_closures.h +++ b/intern/cycles/kernel/osl/osl_closures.h @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -146,4 +146,3 @@ CCLOSURE_PREPARE_STATIC(bsdf_##lower##_prepare, Upper##Closure) CCL_NAMESPACE_END #endif /* __OSL_CLOSURES_H__ */ - diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h index 9585d9f4825..30b29793e2d 100644 --- a/intern/cycles/kernel/osl/osl_globals.h +++ b/intern/cycles/kernel/osl/osl_globals.h @@ -95,4 +95,3 @@ CCL_NAMESPACE_END #endif #endif /* __OSL_GLOBALS_H__ */ - diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp index 4b7a4cb34b7..7902381440b 100644 --- a/intern/cycles/kernel/osl/osl_services.cpp +++ b/intern/cycles/kernel/osl/osl_services.cpp @@ -364,7 +364,7 @@ bool OSLRenderServices::get_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result bool OSLRenderServices::get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, ustring to) { KernelGlobals *kg = kernel_globals; - + if(to == u_ndc) { copy_matrix(result, kernel_data.cam.worldtondc); return true; @@ -381,11 +381,11 @@ bool OSLRenderServices::get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 copy_matrix(result, kernel_data.cam.worldtocamera); return true; } - + return false; } -bool OSLRenderServices::get_array_attribute(OSL::ShaderGlobals *sg, bool derivatives, +bool OSLRenderServices::get_array_attribute(OSL::ShaderGlobals *sg, bool derivatives, ustring object, TypeDesc type, ustring name, int index, void *val) { @@ -684,7 +684,7 @@ bool OSLRenderServices::get_object_standard_attribute(KernelGlobals *kg, ShaderD float3 f = particle_angular_velocity(kg, particle_id); return set_attribute_float3(f, type, derivatives, val); } - + /* Geometry Attributes */ else if(name == u_geom_numpolyvertices) { return set_attribute_int(3, type, derivatives, val); @@ -873,7 +873,7 @@ bool OSLRenderServices::get_attribute(ShaderData *sd, bool derivatives, ustring return false; } -bool OSLRenderServices::get_userdata(bool derivatives, ustring name, TypeDesc type, +bool OSLRenderServices::get_userdata(bool derivatives, ustring name, TypeDesc type, OSL::ShaderGlobals *sg, void *val) { return false; /* disabled by lockgeom */ diff --git a/intern/cycles/kernel/osl/osl_services.h b/intern/cycles/kernel/osl/osl_services.h index 1a40e2ece2b..50044746fd1 100644 --- a/intern/cycles/kernel/osl/osl_services.h +++ b/intern/cycles/kernel/osl/osl_services.h @@ -45,18 +45,18 @@ class OSLRenderServices : public OSL::RendererServices public: OSLRenderServices(); ~OSLRenderServices(); - + void thread_init(KernelGlobals *kernel_globals, OSL::TextureSystem *ts); bool get_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time); bool get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform, float time); - + bool get_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, ustring from, float time); bool get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, ustring to, float time); - + bool get_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform); bool get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, OSL::TransformationPtr xform); - + bool get_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, ustring from); bool get_inverse_matrix(OSL::ShaderGlobals *sg, OSL::Matrix44 &result, ustring from); @@ -195,4 +195,3 @@ private: CCL_NAMESPACE_END #endif /* __OSL_SERVICES_H__ */ - diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp index b7d1c629291..6a690e880ad 100644 --- a/intern/cycles/kernel/osl/osl_shader.cpp +++ b/intern/cycles/kernel/osl/osl_shader.cpp @@ -115,7 +115,7 @@ static void shaderdata_to_shaderglobals(KernelGlobals *kg, ShaderData *sd, PathS globals->backfacing = (sd->flag & SD_BACKFACING); /* shader data to be used in services callbacks */ - globals->renderstate = sd; + globals->renderstate = sd; /* hacky, we leave it to services to fetch actual object matrix */ globals->shader2common = sd; @@ -340,7 +340,7 @@ void OSLShader::eval_volume(KernelGlobals *kg, ShaderData *sd, PathState *state, if(kg->osl->volume_state[shader]) { ss->execute(octx, *(kg->osl->volume_state[shader]), *globals); } - + /* flatten closure tree */ if(globals->Ci) flatten_volume_closure_tree(sd, globals->Ci); @@ -405,4 +405,3 @@ int OSLShader::find_attribute(KernelGlobals *kg, const ShaderData *sd, uint id, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/osl/osl_shader.h b/intern/cycles/kernel/osl/osl_shader.h index 6b392b25cf7..571a3f502be 100644 --- a/intern/cycles/kernel/osl/osl_shader.h +++ b/intern/cycles/kernel/osl/osl_shader.h @@ -67,4 +67,3 @@ CCL_NAMESPACE_END #endif #endif /* __OSL_SHADER_H__ */ - diff --git a/intern/cycles/kernel/shaders/node_color.h b/intern/cycles/kernel/shaders/node_color.h index 2c3a810cb18..fc758bef1fa 100644 --- a/intern/cycles/kernel/shaders/node_color.h +++ b/intern/cycles/kernel/shaders/node_color.h @@ -131,7 +131,7 @@ color hsv_to_rgb(color hsv) else { if (h == 1.0) h = 0.0; - + h *= 6.0; i = floor(h); f = h - i; @@ -150,4 +150,3 @@ color hsv_to_rgb(color hsv) return rgb; } - diff --git a/intern/cycles/kernel/shaders/node_fresnel.h b/intern/cycles/kernel/shaders/node_fresnel.h index de2d40a849c..fcb0efa8445 100644 --- a/intern/cycles/kernel/shaders/node_fresnel.h +++ b/intern/cycles/kernel/shaders/node_fresnel.h @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + float fresnel_dielectric_cos(float cosi, float eta) { /* compute fresnel reflectance without explicitly computing @@ -46,4 +46,3 @@ color fresnel_conductor(float cosi, color eta, color k) (tmp_f + (2.0 * eta * cosi) + cosi2); return (Rparl2 + Rperp2) * 0.5; } - diff --git a/intern/cycles/kernel/shaders/node_ramp_util.h b/intern/cycles/kernel/shaders/node_ramp_util.h index 917fb65c6df..d07d5a98316 100644 --- a/intern/cycles/kernel/shaders/node_ramp_util.h +++ b/intern/cycles/kernel/shaders/node_ramp_util.h @@ -84,6 +84,6 @@ float rgb_ramp_lookup(float ramp[], float at, int interpolate, int extrapolate) if (interpolate && t > 0.0) result = (1.0 - t) * result + t * ramp[i + 1]; - + return result; } diff --git a/intern/cycles/kernel/shaders/node_texture.h b/intern/cycles/kernel/shaders/node_texture.h index fc2cfdcd55c..88305fb320f 100644 --- a/intern/cycles/kernel/shaders/node_texture.h +++ b/intern/cycles/kernel/shaders/node_texture.h @@ -90,11 +90,11 @@ void voronoi(point p, float e, float da[4], point pa[4]) float safe_noise(point p, string type) { float f = 0.0; - + /* Perlin noise in range -1..1 */ if (type == "signed") f = noise("perlin", p); - + /* Perlin noise in range 0..1 */ else f = noise(p); @@ -102,7 +102,7 @@ float safe_noise(point p, string type) /* can happen for big coordinates, things even out to 0.5 then anyway */ if (!isfinite(f)) return 0.5; - + return f; } @@ -114,7 +114,7 @@ float noise_turbulence(point p, float details, int hard) float amp = 1.0; float sum = 0.0; int i, n; - + float octaves = clamp(details, 0.0, 16.0); n = (int)octaves; @@ -128,7 +128,7 @@ float noise_turbulence(point p, float details, int hard) amp *= 0.5; fscale *= 2.0; } - + float rmd = octaves - floor(octaves); if (rmd != 0.0) { @@ -160,7 +160,6 @@ float nonzero(float f, float eps) r = sign(f) * eps; else r = f; - + return r; } - diff --git a/intern/cycles/kernel/shaders/stdosl.h b/intern/cycles/kernel/shaders/stdosl.h index 091ade4a60d..82223ca0219 100644 --- a/intern/cycles/kernel/shaders/stdosl.h +++ b/intern/cycles/kernel/shaders/stdosl.h @@ -213,7 +213,7 @@ void fresnel (vector I, normal N, float eta, F *= sqr (beta / (g+c)); Kr = F; Kt = (1.0 - Kr) * eta*eta; - // OPT: the following recomputes some of the above values, but it + // OPT: the following recomputes some of the above values, but it // gives us the same result as if the shader-writer called refract() T = refract(I, N, eta); } else { @@ -415,7 +415,7 @@ color transformc (string from, string to, color x) return transformc (to, r); } - + // Matrix functions diff --git a/intern/cycles/kernel/split/kernel_branched.h b/intern/cycles/kernel/split/kernel_branched.h index 368a4395760..ed0a82067f1 100644 --- a/intern/cycles/kernel/split/kernel_branched.h +++ b/intern/cycles/kernel/split/kernel_branched.h @@ -231,4 +231,3 @@ ccl_device_noinline bool kernel_split_branched_path_surface_indirect_light_iter( #endif /* __BRANCHED_PATH__ */ CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/split/kernel_lamp_emission.h b/intern/cycles/kernel/split/kernel_lamp_emission.h index c14f66f664f..5b2c554b922 100644 --- a/intern/cycles/kernel/split/kernel_lamp_emission.h +++ b/intern/cycles/kernel/split/kernel_lamp_emission.h @@ -65,4 +65,3 @@ ccl_device void kernel_lamp_emission(KernelGlobals *kg) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/split/kernel_shadow_blocked_ao.h b/intern/cycles/kernel/split/kernel_shadow_blocked_ao.h index a4cffd77eff..fb08112503a 100644 --- a/intern/cycles/kernel/split/kernel_shadow_blocked_ao.h +++ b/intern/cycles/kernel/split/kernel_shadow_blocked_ao.h @@ -52,4 +52,3 @@ ccl_device void kernel_shadow_blocked_ao(KernelGlobals *kg) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h index 2bee4bc7b69..ab69afa051e 100644 --- a/intern/cycles/kernel/svm/svm.h +++ b/intern/cycles/kernel/svm/svm.h @@ -498,4 +498,3 @@ ccl_device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ccl_a CCL_NAMESPACE_END #endif /* __SVM_H__ */ - diff --git a/intern/cycles/kernel/svm/svm_attribute.h b/intern/cycles/kernel/svm/svm_attribute.h index 229a3f20421..d98f538d089 100644 --- a/intern/cycles/kernel/svm/svm_attribute.h +++ b/intern/cycles/kernel/svm/svm_attribute.h @@ -154,4 +154,3 @@ void svm_node_attr_bump_dy(KernelGlobals *kg, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_bevel.h b/intern/cycles/kernel/svm/svm_bevel.h index 89f4a98e846..19cdb71c20f 100644 --- a/intern/cycles/kernel/svm/svm_bevel.h +++ b/intern/cycles/kernel/svm/svm_bevel.h @@ -223,4 +223,3 @@ ccl_device void svm_node_bevel( } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_brick.h b/intern/cycles/kernel/svm/svm_brick.h index 90fa2a99b67..744d9ff16c5 100644 --- a/intern/cycles/kernel/svm/svm_brick.h +++ b/intern/cycles/kernel/svm/svm_brick.h @@ -36,7 +36,7 @@ ccl_device_noinline float2 svm_brick(float3 p, float mortar_size, float mortar_s float x, y; rownum = floor_to_int(p.y / row_height); - + if(offset_frequency && squash_frequency) { brick_width *= (rownum % squash_frequency) ? 1.0f : squash_amount; /* squash */ offset = (rownum % offset_frequency) ? 0.0f : (brick_width*offset_amount); /* offset */ @@ -66,31 +66,31 @@ ccl_device_noinline float2 svm_brick(float3 p, float mortar_size, float mortar_s } ccl_device void svm_node_tex_brick(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node, int *offset) -{ +{ uint4 node2 = read_node(kg, offset); uint4 node3 = read_node(kg, offset); uint4 node4 = read_node(kg, offset); - + /* Input and Output Sockets */ uint co_offset, color1_offset, color2_offset, mortar_offset, scale_offset; uint mortar_size_offset, bias_offset, brick_width_offset, row_height_offset; uint color_offset, fac_offset, mortar_smooth_offset; - + /* RNA properties */ uint offset_frequency, squash_frequency; - + decode_node_uchar4(node.y, &co_offset, &color1_offset, &color2_offset, &mortar_offset); decode_node_uchar4(node.z, &scale_offset, &mortar_size_offset, &bias_offset, &brick_width_offset); decode_node_uchar4(node.w, &row_height_offset, &color_offset, &fac_offset, &mortar_smooth_offset); - + decode_node_uchar4(node2.x, &offset_frequency, &squash_frequency, NULL, NULL); float3 co = stack_load_float3(stack, co_offset); - + float3 color1 = stack_load_float3(stack, color1_offset); float3 color2 = stack_load_float3(stack, color2_offset); float3 mortar = stack_load_float3(stack, mortar_offset); - + float scale = stack_load_float_default(stack, scale_offset, node2.y); float mortar_size = stack_load_float_default(stack, mortar_size_offset, node2.z); float mortar_smooth = stack_load_float_default(stack, mortar_smooth_offset, node4.x); @@ -99,13 +99,13 @@ ccl_device void svm_node_tex_brick(KernelGlobals *kg, ShaderData *sd, float *sta float row_height = stack_load_float_default(stack, row_height_offset, node3.y); float offset_amount = __int_as_float(node3.z); float squash_amount = __int_as_float(node3.w); - + float2 f2 = svm_brick(co*scale, mortar_size, mortar_smooth, bias, brick_width, row_height, offset_amount, offset_frequency, squash_amount, squash_frequency); float tint = f2.x; float f = f2.y; - + if(f != 1.0f) { float facm = 1.0f - tint; color1 = facm * color1 + tint * color2; @@ -118,4 +118,3 @@ ccl_device void svm_node_tex_brick(KernelGlobals *kg, ShaderData *sd, float *sta } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_bump.h b/intern/cycles/kernel/svm/svm_bump.h index 610d9af9e1f..1c1fe155538 100644 --- a/intern/cycles/kernel/svm/svm_bump.h +++ b/intern/cycles/kernel/svm/svm_bump.h @@ -51,4 +51,3 @@ ccl_device void svm_node_leave_bump_eval(KernelGlobals *kg, ShaderData *sd, floa } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_camera.h b/intern/cycles/kernel/svm/svm_camera.h index 90249dfd978..cf90229b53b 100644 --- a/intern/cycles/kernel/svm/svm_camera.h +++ b/intern/cycles/kernel/svm/svm_camera.h @@ -38,4 +38,3 @@ ccl_device void svm_node_camera(KernelGlobals *kg, ShaderData *sd, float *stack, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_checker.h b/intern/cycles/kernel/svm/svm_checker.h index cea245991de..45e6c181e9e 100644 --- a/intern/cycles/kernel/svm/svm_checker.h +++ b/intern/cycles/kernel/svm/svm_checker.h @@ -33,7 +33,7 @@ ccl_device_noinline float svm_checker(float3 p) } ccl_device void svm_node_tex_checker(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node) -{ +{ uint co_offset, color1_offset, color2_offset, scale_offset; uint color_offset, fac_offset; @@ -44,7 +44,7 @@ ccl_device void svm_node_tex_checker(KernelGlobals *kg, ShaderData *sd, float *s float3 color1 = stack_load_float3(stack, color1_offset); float3 color2 = stack_load_float3(stack, color2_offset); float scale = stack_load_float_default(stack, scale_offset, node.w); - + float f = svm_checker(co*scale); if(stack_valid(color_offset)) @@ -54,4 +54,3 @@ ccl_device void svm_node_tex_checker(KernelGlobals *kg, ShaderData *sd, float *s } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h index f5b316c67da..4de9cfb88db 100644 --- a/intern/cycles/kernel/svm/svm_closure.h +++ b/intern/cycles/kernel/svm/svm_closure.h @@ -130,7 +130,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * // calculate weights of the diffuse and specular part float diffuse_weight = (1.0f - saturate(metallic)) * (1.0f - saturate(transmission)); - + float final_transmission = saturate(transmission) * (1.0f - saturate(metallic)); float specular_weight = (1.0f - final_transmission); @@ -713,7 +713,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * bsdf->N = N; bsdf->size = param1; bsdf->smooth = param2; - + if(type == CLOSURE_BSDF_DIFFUSE_TOON_ID) sd->flag |= bsdf_diffuse_toon_setup(bsdf); else @@ -725,7 +725,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float * case CLOSURE_BSDF_HAIR_REFLECTION_ID: case CLOSURE_BSDF_HAIR_TRANSMISSION_ID: { float3 weight = sd->svm_closure_weight * mix_weight; - + if(sd->flag & SD_BACKFACING && sd->type & PRIMITIVE_ALL_CURVE) { /* todo: giving a fixed weight here will cause issues when * mixing multiple BSDFS. energy will not be conserved and @@ -1055,4 +1055,3 @@ ccl_device void svm_node_set_normal(KernelGlobals *kg, ShaderData *sd, float *st } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_color_util.h b/intern/cycles/kernel/svm/svm_color_util.h index 258cdeb630e..d5945f915c6 100644 --- a/intern/cycles/kernel/svm/svm_color_util.h +++ b/intern/cycles/kernel/svm/svm_color_util.h @@ -60,7 +60,7 @@ ccl_device float3 svm_mix_overlay(float t, float3 col1, float3 col2) outcol.z *= tm + 2.0f*t*col2.z; else outcol.z = 1.0f - (tm + 2.0f*t*(1.0f - col2.z))*(1.0f - outcol.z); - + return outcol; } @@ -167,7 +167,7 @@ ccl_device float3 svm_mix_burn(float t, float3 col1, float3 col2) outcol.z = 1.0f; else outcol.z = tmp; - + return outcol; } @@ -180,7 +180,7 @@ ccl_device float3 svm_mix_hue(float t, float3 col1, float3 col2) if(hsv2.y != 0.0f) { float3 hsv = rgb_to_hsv(outcol); hsv.x = hsv2.x; - float3 tmp = hsv_to_rgb(hsv); + float3 tmp = hsv_to_rgb(hsv); outcol = interp(outcol, tmp, t); } @@ -227,7 +227,7 @@ ccl_device float3 svm_mix_color(float t, float3 col1, float3 col2) float3 hsv = rgb_to_hsv(outcol); hsv.x = hsv2.x; hsv.y = hsv2.y; - float3 tmp = hsv_to_rgb(hsv); + float3 tmp = hsv_to_rgb(hsv); outcol = interp(outcol, tmp, t); } @@ -303,4 +303,3 @@ ccl_device_inline float3 svm_brightness_contrast(float3 color, float brightness, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_convert.h b/intern/cycles/kernel/svm/svm_convert.h index c88ac57e20d..63b1dc6865e 100644 --- a/intern/cycles/kernel/svm/svm_convert.h +++ b/intern/cycles/kernel/svm/svm_convert.h @@ -69,4 +69,3 @@ ccl_device void svm_node_convert(KernelGlobals *kg, ShaderData *sd, float *stack } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_displace.h b/intern/cycles/kernel/svm/svm_displace.h index 533b7f065e6..b85eb9c0458 100644 --- a/intern/cycles/kernel/svm/svm_displace.h +++ b/intern/cycles/kernel/svm/svm_displace.h @@ -160,4 +160,3 @@ ccl_device void svm_node_vector_displacement(KernelGlobals *kg, ShaderData *sd, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_fresnel.h b/intern/cycles/kernel/svm/svm_fresnel.h index 3703ec55015..99dda5fb170 100644 --- a/intern/cycles/kernel/svm/svm_fresnel.h +++ b/intern/cycles/kernel/svm/svm_fresnel.h @@ -24,7 +24,7 @@ ccl_device void svm_node_fresnel(ShaderData *sd, float *stack, uint ior_offset, decode_node_uchar4(node, &normal_offset, &out_offset, NULL, NULL); float eta = (stack_valid(ior_offset))? stack_load_float(stack, ior_offset): __uint_as_float(ior_value); float3 normal_in = stack_valid(normal_offset)? stack_load_float3(stack, normal_offset): sd->N; - + eta = fmaxf(eta, 1e-5f); eta = (sd->flag & SD_BACKFACING)? 1.0f/eta: eta; @@ -71,4 +71,3 @@ ccl_device void svm_node_layer_weight(ShaderData *sd, float *stack, uint4 node) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_geometry.h b/intern/cycles/kernel/svm/svm_geometry.h index 81308d6f12b..05443772505 100644 --- a/intern/cycles/kernel/svm/svm_geometry.h +++ b/intern/cycles/kernel/svm/svm_geometry.h @@ -208,4 +208,3 @@ ccl_device void svm_node_hair_info(KernelGlobals *kg, #endif CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_gradient.h b/intern/cycles/kernel/svm/svm_gradient.h index 74e36e70427..177e0506dee 100644 --- a/intern/cycles/kernel/svm/svm_gradient.h +++ b/intern/cycles/kernel/svm/svm_gradient.h @@ -36,7 +36,7 @@ ccl_device float svm_gradient(float3 p, NodeGradientType type) else if(type == NODE_BLEND_EASING) { float r = fminf(fmaxf(x, 0.0f), 1.0f); float t = r*r; - + return (3.0f*t - 2.0f*t*r); } else if(type == NODE_BLEND_DIAGONAL) { @@ -78,4 +78,3 @@ ccl_device void svm_node_tex_gradient(ShaderData *sd, float *stack, uint4 node) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_hsv.h b/intern/cycles/kernel/svm/svm_hsv.h index 3a1840c12e2..27127b85323 100644 --- a/intern/cycles/kernel/svm/svm_hsv.h +++ b/intern/cycles/kernel/svm/svm_hsv.h @@ -60,4 +60,3 @@ ccl_device void svm_node_hsv(KernelGlobals *kg, ShaderData *sd, float *stack, ui CCL_NAMESPACE_END #endif /* __SVM_HSV_H__ */ - diff --git a/intern/cycles/kernel/svm/svm_image.h b/intern/cycles/kernel/svm/svm_image.h index 28565308867..81ee79c984e 100644 --- a/intern/cycles/kernel/svm/svm_image.h +++ b/intern/cycles/kernel/svm/svm_image.h @@ -203,4 +203,3 @@ ccl_device void svm_node_tex_environment(KernelGlobals *kg, ShaderData *sd, floa } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_invert.h b/intern/cycles/kernel/svm/svm_invert.h index 5ce858e2e5d..57cc4281101 100644 --- a/intern/cycles/kernel/svm/svm_invert.h +++ b/intern/cycles/kernel/svm/svm_invert.h @@ -35,4 +35,3 @@ ccl_device void svm_node_invert(ShaderData *sd, float *stack, uint in_fac, uint } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_light_path.h b/intern/cycles/kernel/svm/svm_light_path.h index 1492e358608..dd4390057cf 100644 --- a/intern/cycles/kernel/svm/svm_light_path.h +++ b/intern/cycles/kernel/svm/svm_light_path.h @@ -74,4 +74,3 @@ ccl_device void svm_node_light_falloff(ShaderData *sd, float *stack, uint4 node) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_magic.h b/intern/cycles/kernel/svm/svm_magic.h index ac87c77d719..6afaff37acd 100644 --- a/intern/cycles/kernel/svm/svm_magic.h +++ b/intern/cycles/kernel/svm/svm_magic.h @@ -109,4 +109,3 @@ ccl_device void svm_node_tex_magic(KernelGlobals *kg, ShaderData *sd, float *sta } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_mapping.h b/intern/cycles/kernel/svm/svm_mapping.h index 42a7ae9946f..86181283821 100644 --- a/intern/cycles/kernel/svm/svm_mapping.h +++ b/intern/cycles/kernel/svm/svm_mapping.h @@ -43,4 +43,3 @@ ccl_device void svm_node_min_max(KernelGlobals *kg, ShaderData *sd, float *stack } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_math.h b/intern/cycles/kernel/svm/svm_math.h index d633e54ed8d..c9a838361cd 100644 --- a/intern/cycles/kernel/svm/svm_math.h +++ b/intern/cycles/kernel/svm/svm_math.h @@ -47,4 +47,3 @@ ccl_device void svm_node_vector_math(KernelGlobals *kg, ShaderData *sd, float *s } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_math_util.h b/intern/cycles/kernel/svm/svm_math_util.h index caf0addbf35..04864bd610a 100644 --- a/intern/cycles/kernel/svm/svm_math_util.h +++ b/intern/cycles/kernel/svm/svm_math_util.h @@ -98,7 +98,7 @@ ccl_device float svm_math(NodeMath type, float Fac1, float Fac2) Fac = saturate(Fac1); else Fac = 0.0f; - + return Fac; } @@ -180,4 +180,3 @@ ccl_device_inline float3 svm_math_gamma_color(float3 color, float gamma) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_mix.h b/intern/cycles/kernel/svm/svm_mix.h index 022a68d1928..903a4dacebf 100644 --- a/intern/cycles/kernel/svm/svm_mix.h +++ b/intern/cycles/kernel/svm/svm_mix.h @@ -32,4 +32,3 @@ ccl_device void svm_node_mix(KernelGlobals *kg, ShaderData *sd, float *stack, ui } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_musgrave.h b/intern/cycles/kernel/svm/svm_musgrave.h index 09eba31945e..5d9e12628ca 100644 --- a/intern/cycles/kernel/svm/svm_musgrave.h +++ b/intern/cycles/kernel/svm/svm_musgrave.h @@ -193,7 +193,7 @@ ccl_device float svm_musgrave(NodeMusgraveType type, float dimension, float lacu return intensity*noise_musgrave_ridged_multi_fractal(p, dimension, lacunarity, octaves, offset, gain); else if(type == NODE_MUSGRAVE_HETERO_TERRAIN) return intensity*noise_musgrave_hetero_terrain(p, dimension, lacunarity, octaves, offset); - + return 0.0f; } @@ -232,4 +232,3 @@ ccl_device void svm_node_tex_musgrave(KernelGlobals *kg, ShaderData *sd, float * } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_noise.h b/intern/cycles/kernel/svm/svm_noise.h index 3f75ae5c04e..38074f0faff 100644 --- a/intern/cycles/kernel/svm/svm_noise.h +++ b/intern/cycles/kernel/svm/svm_noise.h @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -120,7 +120,7 @@ ccl_device int imod(int a, int b) return a < 0 ? a + b : a; } -ccl_device uint phash(int kx, int ky, int kz, int3 p) +ccl_device uint phash(int kx, int ky, int kz, int3 p) { return hash(imod(kx, p.x), imod(ky, p.y), imod(kz, p.z)); } @@ -334,4 +334,3 @@ ccl_device ssef cellnoise_color(const ssef& p) #endif CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_noisetex.h b/intern/cycles/kernel/svm/svm_noisetex.h index 0347ab7b193..c02940f96d6 100644 --- a/intern/cycles/kernel/svm/svm_noisetex.h +++ b/intern/cycles/kernel/svm/svm_noisetex.h @@ -57,4 +57,3 @@ ccl_device void svm_node_tex_noise(KernelGlobals *kg, ShaderData *sd, float *sta } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_normal.h b/intern/cycles/kernel/svm/svm_normal.h index 53abef71012..fe46d79fe15 100644 --- a/intern/cycles/kernel/svm/svm_normal.h +++ b/intern/cycles/kernel/svm/svm_normal.h @@ -36,4 +36,3 @@ ccl_device void svm_node_normal(KernelGlobals *kg, ShaderData *sd, float *stack, } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_ramp.h b/intern/cycles/kernel/svm/svm_ramp.h index 368740f64c7..a3e4b6e87cd 100644 --- a/intern/cycles/kernel/svm/svm_ramp.h +++ b/intern/cycles/kernel/svm/svm_ramp.h @@ -109,4 +109,3 @@ ccl_device void svm_node_curves(KernelGlobals *kg, ShaderData *sd, float *stack, CCL_NAMESPACE_END #endif /* __SVM_RAMP_H__ */ - diff --git a/intern/cycles/kernel/svm/svm_ramp_util.h b/intern/cycles/kernel/svm/svm_ramp_util.h index b0adadae9b7..a67689ff9d1 100644 --- a/intern/cycles/kernel/svm/svm_ramp_util.h +++ b/intern/cycles/kernel/svm/svm_ramp_util.h @@ -96,4 +96,3 @@ ccl_device float float_ramp_lookup(const float *ramp, CCL_NAMESPACE_END #endif /* __SVM_RAMP_UTIL_H__ */ - diff --git a/intern/cycles/kernel/svm/svm_sepcomb_hsv.h b/intern/cycles/kernel/svm/svm_sepcomb_hsv.h index 6f51b163756..1096aed2d97 100644 --- a/intern/cycles/kernel/svm/svm_sepcomb_hsv.h +++ b/intern/cycles/kernel/svm/svm_sepcomb_hsv.h @@ -20,11 +20,11 @@ ccl_device void svm_node_combine_hsv(KernelGlobals *kg, ShaderData *sd, float *s { uint4 node1 = read_node(kg, offset); uint color_out = node1.y; - + float hue = stack_load_float(stack, hue_in); float saturation = stack_load_float(stack, saturation_in); float value = stack_load_float(stack, value_in); - + /* Combine, and convert back to RGB */ float3 color = hsv_to_rgb(make_float3(hue, saturation, value)); @@ -36,9 +36,9 @@ ccl_device void svm_node_separate_hsv(KernelGlobals *kg, ShaderData *sd, float * { uint4 node1 = read_node(kg, offset); uint value_out = node1.y; - + float3 color = stack_load_float3(stack, color_in); - + /* Convert to HSV */ color = rgb_to_hsv(color); @@ -51,4 +51,3 @@ ccl_device void svm_node_separate_hsv(KernelGlobals *kg, ShaderData *sd, float * } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_sepcomb_vector.h b/intern/cycles/kernel/svm/svm_sepcomb_vector.h index 63570dd6942..0d85c0d6f1d 100644 --- a/intern/cycles/kernel/svm/svm_sepcomb_vector.h +++ b/intern/cycles/kernel/svm/svm_sepcomb_vector.h @@ -41,4 +41,3 @@ ccl_device void svm_node_separate_vector(ShaderData *sd, float *stack, uint ivec } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_sky.h b/intern/cycles/kernel/svm/svm_sky.h index b83a7168541..092f6e045d6 100644 --- a/intern/cycles/kernel/svm/svm_sky.h +++ b/intern/cycles/kernel/svm/svm_sky.h @@ -110,7 +110,7 @@ ccl_device void svm_node_tex_sky(KernelGlobals *kg, ShaderData *sd, float *stack /* Define variables */ float sunphi, suntheta, radiance_x, radiance_y, radiance_z; float config_x[9], config_y[9], config_z[9]; - + /* Load data */ uint dir_offset = node.y; uint out_offset = node.z; @@ -121,49 +121,49 @@ ccl_device void svm_node_tex_sky(KernelGlobals *kg, ShaderData *sd, float *stack suntheta = data.y; radiance_x = data.z; radiance_y = data.w; - + data = read_node_float(kg, offset); radiance_z = data.x; config_x[0] = data.y; config_x[1] = data.z; config_x[2] = data.w; - + data = read_node_float(kg, offset); config_x[3] = data.x; config_x[4] = data.y; config_x[5] = data.z; config_x[6] = data.w; - + data = read_node_float(kg, offset); config_x[7] = data.x; config_x[8] = data.y; config_y[0] = data.z; config_y[1] = data.w; - + data = read_node_float(kg, offset); config_y[2] = data.x; config_y[3] = data.y; config_y[4] = data.z; config_y[5] = data.w; - + data = read_node_float(kg, offset); config_y[6] = data.x; config_y[7] = data.y; config_y[8] = data.z; config_z[0] = data.w; - + data = read_node_float(kg, offset); config_z[1] = data.x; config_z[2] = data.y; config_z[3] = data.z; config_z[4] = data.w; - + data = read_node_float(kg, offset); config_z[5] = data.x; config_z[6] = data.y; config_z[7] = data.z; config_z[8] = data.w; - + float3 dir = stack_load_float3(stack, dir_offset); float3 f; @@ -183,4 +183,3 @@ ccl_device void svm_node_tex_sky(KernelGlobals *kg, ShaderData *sd, float *stack } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_tex_coord.h b/intern/cycles/kernel/svm/svm_tex_coord.h index 6ff39e5f587..7c207083929 100644 --- a/intern/cycles/kernel/svm/svm_tex_coord.h +++ b/intern/cycles/kernel/svm/svm_tex_coord.h @@ -323,7 +323,7 @@ ccl_device void svm_node_normal_map(KernelGlobals *kg, ShaderData *sd, float *st color.y = -color.y; color.z = -color.z; } - + /* object, world space */ N = color; @@ -392,4 +392,3 @@ ccl_device void svm_node_tangent(KernelGlobals *kg, ShaderData *sd, float *stack } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_texture.h b/intern/cycles/kernel/svm/svm_texture.h index dcb00f7dd55..57729817bdc 100644 --- a/intern/cycles/kernel/svm/svm_texture.h +++ b/intern/cycles/kernel/svm/svm_texture.h @@ -61,4 +61,3 @@ ccl_device_noinline float noise_turbulence(float3 p, float octaves, int hard) } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h index 54db18cd7bb..b94a83b6712 100644 --- a/intern/cycles/kernel/svm/svm_types.h +++ b/intern/cycles/kernel/svm/svm_types.h @@ -24,7 +24,7 @@ CCL_NAMESPACE_BEGIN /* SVM stack has a fixed size */ #define SVM_STACK_SIZE 255 /* SVM stack offsets with this value indicate that it's not on the stack */ -#define SVM_STACK_INVALID 255 +#define SVM_STACK_INVALID 255 #define SVM_BUMP_EVAL_STATE_SIZE 9 @@ -505,4 +505,3 @@ typedef enum ClosureType { CCL_NAMESPACE_END #endif /* __SVM_TYPES_H__ */ - diff --git a/intern/cycles/kernel/svm/svm_value.h b/intern/cycles/kernel/svm/svm_value.h index c1c2b539df3..062aee2956e 100644 --- a/intern/cycles/kernel/svm/svm_value.h +++ b/intern/cycles/kernel/svm/svm_value.h @@ -33,4 +33,3 @@ ccl_device void svm_node_value_v(KernelGlobals *kg, ShaderData *sd, float *stack } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_vector_transform.h b/intern/cycles/kernel/svm/svm_vector_transform.h index 4e92f27acdb..f6ec36ba41f 100644 --- a/intern/cycles/kernel/svm/svm_vector_transform.h +++ b/intern/cycles/kernel/svm/svm_vector_transform.h @@ -22,20 +22,20 @@ ccl_device void svm_node_vector_transform(KernelGlobals *kg, ShaderData *sd, flo { uint itype, ifrom, ito; uint vector_in, vector_out; - + decode_node_uchar4(node.y, &itype, &ifrom, &ito, NULL); decode_node_uchar4(node.z, &vector_in, &vector_out, NULL, NULL); - + float3 in = stack_load_float3(stack, vector_in); - + NodeVectorTransformType type = (NodeVectorTransformType)itype; NodeVectorTransformConvertSpace from = (NodeVectorTransformConvertSpace)ifrom; NodeVectorTransformConvertSpace to = (NodeVectorTransformConvertSpace)ito; - + Transform tfm; bool is_object = (sd->object != OBJECT_NONE); bool is_direction = (type == NODE_VECTOR_TRANSFORM_TYPE_VECTOR || type == NODE_VECTOR_TRANSFORM_TYPE_NORMAL); - + /* From world */ if(from == NODE_VECTOR_TRANSFORM_CONVERT_SPACE_WORLD) { if(to == NODE_VECTOR_TRANSFORM_CONVERT_SPACE_CAMERA) { @@ -52,7 +52,7 @@ ccl_device void svm_node_vector_transform(KernelGlobals *kg, ShaderData *sd, flo object_inverse_position_transform(kg, sd, &in); } } - + /* From camera */ else if(from == NODE_VECTOR_TRANSFORM_CONVERT_SPACE_CAMERA) { if(to == NODE_VECTOR_TRANSFORM_CONVERT_SPACE_WORLD || to == NODE_VECTOR_TRANSFORM_CONVERT_SPACE_OBJECT) { @@ -69,7 +69,7 @@ ccl_device void svm_node_vector_transform(KernelGlobals *kg, ShaderData *sd, flo object_inverse_position_transform(kg, sd, &in); } } - + /* From object */ else if(from == NODE_VECTOR_TRANSFORM_CONVERT_SPACE_OBJECT) { if((to == NODE_VECTOR_TRANSFORM_CONVERT_SPACE_WORLD || to == NODE_VECTOR_TRANSFORM_CONVERT_SPACE_CAMERA) && is_object) { @@ -86,11 +86,11 @@ ccl_device void svm_node_vector_transform(KernelGlobals *kg, ShaderData *sd, flo in = transform_point(&tfm, in); } } - + /* Normalize Normal */ if(type == NODE_VECTOR_TRANSFORM_TYPE_NORMAL) in = normalize(in); - + /* Output */ if(stack_valid(vector_out)) { stack_store_float3(stack, vector_out, in); @@ -98,4 +98,3 @@ ccl_device void svm_node_vector_transform(KernelGlobals *kg, ShaderData *sd, flo } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_voronoi.h b/intern/cycles/kernel/svm/svm_voronoi.h index d612d7e973f..9bfb182544b 100644 --- a/intern/cycles/kernel/svm/svm_voronoi.h +++ b/intern/cycles/kernel/svm/svm_voronoi.h @@ -137,4 +137,3 @@ ccl_device void svm_node_tex_voronoi(KernelGlobals *kg, ShaderData *sd, float *s } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_wave.h b/intern/cycles/kernel/svm/svm_wave.h index 6ce69458a03..7b60ab6e6ae 100644 --- a/intern/cycles/kernel/svm/svm_wave.h +++ b/intern/cycles/kernel/svm/svm_wave.h @@ -63,4 +63,3 @@ ccl_device void svm_node_tex_wave(KernelGlobals *kg, ShaderData *sd, float *stac } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_wavelength.h b/intern/cycles/kernel/svm/svm_wavelength.h index 62e026278ac..e935fd20690 100644 --- a/intern/cycles/kernel/svm/svm_wavelength.h +++ b/intern/cycles/kernel/svm/svm_wavelength.h @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2013, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -71,12 +71,12 @@ ccl_static_constant float cie_colour_match[81][3] = { }; ccl_device void svm_node_wavelength(KernelGlobals *kg, ShaderData *sd, float *stack, uint wavelength, uint color_out) -{ +{ float lambda_nm = stack_load_float(stack, wavelength); float ii = (lambda_nm-380.0f) * (1.0f/5.0f); // scaled 0..80 int i = float_to_int(ii); float3 color; - + if(i < 0 || i >= 80) { color = make_float3(0.0f, 0.0f, 0.0f); } @@ -85,10 +85,10 @@ ccl_device void svm_node_wavelength(KernelGlobals *kg, ShaderData *sd, float *st ccl_constant float *c = cie_colour_match[i]; color = interp(make_float3(c[0], c[1], c[2]), make_float3(c[3], c[4], c[5]), ii); } - + color = xyz_to_rgb(kg, color); color *= 1.0f/2.52f; // Empirical scale from lg to make all comps <= 1 - + /* Clamp to zero if values are smaller */ color = max(color, make_float3(0.0f, 0.0f, 0.0f)); @@ -96,4 +96,3 @@ ccl_device void svm_node_wavelength(KernelGlobals *kg, ShaderData *sd, float *st } CCL_NAMESPACE_END - diff --git a/intern/cycles/kernel/svm/svm_wireframe.h b/intern/cycles/kernel/svm/svm_wireframe.h index 3c6353c8001..35df9e8a0e7 100644 --- a/intern/cycles/kernel/svm/svm_wireframe.h +++ b/intern/cycles/kernel/svm/svm_wireframe.h @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2013, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -134,4 +134,3 @@ ccl_device void svm_node_wireframe(KernelGlobals *kg, } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp index 8c77687d9cc..a7450849195 100644 --- a/intern/cycles/render/attribute.cpp +++ b/intern/cycles/render/attribute.cpp @@ -202,7 +202,7 @@ bool Attribute::same_storage(TypeDesc a, TypeDesc b) { if(a == b) return true; - + if(a == TypeDesc::TypeColor || a == TypeDesc::TypePoint || a == TypeDesc::TypeVector || a == TypeDesc::TypeNormal) { @@ -292,7 +292,7 @@ const char *Attribute::standard_name(AttributeStandard std) case ATTR_STD_NUM: return ""; } - + return ""; } @@ -476,7 +476,7 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name) } attr->std = std; - + return attr; } @@ -682,7 +682,7 @@ bool AttributeRequestSet::find(ustring name) foreach(AttributeRequest& req, requests) if(req.name == name) return true; - + return false; } @@ -706,4 +706,3 @@ void AttributeRequestSet::clear() } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/attribute.h b/intern/cycles/render/attribute.h index 5cb6c75aab2..40e5be2e1b2 100644 --- a/intern/cycles/render/attribute.h +++ b/intern/cycles/render/attribute.h @@ -173,4 +173,3 @@ public: CCL_NAMESPACE_END #endif /* __ATTRIBUTE_H__ */ - diff --git a/intern/cycles/render/background.cpp b/intern/cycles/render/background.cpp index df3b65be110..d8a49bf6a5e 100644 --- a/intern/cycles/render/background.cpp +++ b/intern/cycles/render/background.cpp @@ -62,7 +62,7 @@ void Background::device_update(Device *device, DeviceScene *dscene, Scene *scene { if(!need_update) return; - + device_free(device, dscene); Shader *bg_shader = shader; @@ -135,4 +135,3 @@ void Background::tag_update(Scene *scene) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/background.h b/intern/cycles/render/background.h index 145c05f1c18..3f56dedb2c8 100644 --- a/intern/cycles/render/background.h +++ b/intern/cycles/render/background.h @@ -60,4 +60,3 @@ public: CCL_NAMESPACE_END #endif /* __BACKGROUND_H__ */ - diff --git a/intern/cycles/render/bake.h b/intern/cycles/render/bake.h index fbb8686b8f6..a811eac3327 100644 --- a/intern/cycles/render/bake.h +++ b/intern/cycles/render/bake.h @@ -84,4 +84,3 @@ private: CCL_NAMESPACE_END #endif /* __BAKE_H__ */ - diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index 91b739741bb..a258b465fa2 100644 --- a/intern/cycles/render/buffers.cpp +++ b/intern/cycles/render/buffers.cpp @@ -452,4 +452,3 @@ bool DisplayBuffer::draw_ready() } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h index ee7c0490dfd..1b06ffe33a6 100644 --- a/intern/cycles/render/buffers.h +++ b/intern/cycles/render/buffers.h @@ -147,4 +147,3 @@ public: CCL_NAMESPACE_END #endif /* __BUFFERS_H__ */ - diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp index 734cdffd5c5..cc3dd1c923b 100644 --- a/intern/cycles/render/camera.cpp +++ b/intern/cycles/render/camera.cpp @@ -246,7 +246,7 @@ void Camera::update(Scene *scene) cameratoscreen = projection_orthographic(nearclip, farclip); else cameratoscreen = projection_identity(); - + ProjectionTransform screentocamera = projection_inverse(cameratoscreen); rastertocamera = screentocamera * rastertoscreen; diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h index 37d05c01bd9..323f2c61ca4 100644 --- a/intern/cycles/render/camera.h +++ b/intern/cycles/render/camera.h @@ -181,7 +181,7 @@ public: /* functions */ Camera(); ~Camera(); - + void compute_auto_viewplane(); void update(Scene *scene); @@ -213,4 +213,3 @@ private: CCL_NAMESPACE_END #endif /* __CAMERA_H__ */ - diff --git a/intern/cycles/render/constant_fold.h b/intern/cycles/render/constant_fold.h index cc24d614206..26fa4e8b1c8 100644 --- a/intern/cycles/render/constant_fold.h +++ b/intern/cycles/render/constant_fold.h @@ -71,4 +71,3 @@ public: CCL_NAMESPACE_END #endif /* __CONSTANT_FOLD_H__ */ - diff --git a/intern/cycles/render/curves.cpp b/intern/cycles/render/curves.cpp index 4c085b928fb..58b71d3e122 100644 --- a/intern/cycles/render/curves.cpp +++ b/intern/cycles/render/curves.cpp @@ -188,4 +188,3 @@ void CurveSystemManager::tag_update_mesh() need_mesh_update = true; } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/curves.h b/intern/cycles/render/curves.h index 8834764bd63..62066d8a809 100644 --- a/intern/cycles/render/curves.h +++ b/intern/cycles/render/curves.h @@ -120,4 +120,3 @@ public: CCL_NAMESPACE_END #endif /* __CURVES_H__ */ - diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index 69828cc78da..8f3596ade58 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -175,11 +175,11 @@ bool Pass::equals(const array<Pass>& A, const array<Pass>& B) { if(A.size() != B.size()) return false; - + for(int i = 0; i < A.size(); i++) if(A[i].type != B[i].type) return false; - + return true; } @@ -188,7 +188,7 @@ bool Pass::contains(const array<Pass>& passes, PassType type) for(size_t i = 0; i < passes.size(); i++) if(passes[i].type == type) return true; - + return false; } @@ -302,7 +302,7 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene) { if(!need_update) return; - + device_free(device, dscene, scene); KernelFilm *kfilm = &dscene->data.film; @@ -510,4 +510,3 @@ void Film::tag_update(Scene * /*scene*/) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h index 29b1e7e9157..6ab2eea79b8 100644 --- a/intern/cycles/render/film.h +++ b/intern/cycles/render/film.h @@ -93,4 +93,3 @@ public: CCL_NAMESPACE_END #endif /* __FILM_H__ */ - diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp index 8b179f742c4..78a2039c423 100644 --- a/intern/cycles/render/graph.cpp +++ b/intern/cycles/render/graph.cpp @@ -745,7 +745,7 @@ void ShaderGraph::clean(Scene *scene) vector<bool> visited(num_node_ids, false); vector<bool> on_stack(num_node_ids, false); - + /* break cycles */ break_cycles(output(), visited, on_stack); @@ -860,7 +860,7 @@ void ShaderGraph::refine_bump_nodes() copy_nodes(nodes_bump, nodes_dx); copy_nodes(nodes_bump, nodes_dy); - + /* mark nodes to indicate they are use for bump computation, so that any texture coordinates are shifted by dx/dy when sampling */ foreach(ShaderNode *node, nodes_bump) @@ -876,13 +876,13 @@ void ShaderGraph::refine_bump_nodes() connect(out_dx, node->input("SampleX")); connect(out_dy, node->input("SampleY")); - + /* add generated nodes */ foreach(NodePair& pair, nodes_dx) add(pair.second); foreach(NodePair& pair, nodes_dy) add(pair.second); - + /* connect what is connected is bump to samplecenter input*/ connect(out , node->input("SampleCenter")); @@ -941,7 +941,7 @@ void ShaderGraph::bump_from_displacement(bool use_object_space) * this for bump from displacement, this will be the only bump allowed to * overwrite the shader normal */ ShaderNode *set_normal = add(new SetNormalNode()); - + /* add bump node and connect copied graphs to it */ BumpNode *bump = (BumpNode*)add(new BumpNode()); bump->use_object_space = use_object_space; @@ -973,7 +973,7 @@ void ShaderGraph::bump_from_displacement(bool use_object_space) connect(dot_center->output("Value"), bump->input("SampleCenter")); connect(dot_dx->output("Value"), bump->input("SampleX")); connect(dot_dy->output("Value"), bump->input("SampleY")); - + /* connect the bump out to the set normal in: */ connect(bump->output("Normal"), set_normal->input("Direction")); @@ -996,7 +996,7 @@ void ShaderGraph::transform_multi_closure(ShaderNode *node, ShaderOutput *weight * the graph into nodes that feed weights into closure nodes. this is too * avoid building a closure tree and then flattening it, and instead write it * directly to an array */ - + if(node->special_type == SHADER_SPECIAL_TYPE_COMBINE_CLOSURE) { ShaderInput *fin = node->input("Fac"); ShaderInput *cl1in = node->input("Closure1"); @@ -1007,8 +1007,8 @@ void ShaderGraph::transform_multi_closure(ShaderNode *node, ShaderOutput *weight /* mix closure: add node to mix closure weights */ MixClosureWeightNode *mix_node = new MixClosureWeightNode(); add(mix_node); - ShaderInput *fac_in = mix_node->input("Fac"); - ShaderInput *weight_in = mix_node->input("Weight"); + ShaderInput *fac_in = mix_node->input("Fac"); + ShaderInput *weight_in = mix_node->input("Weight"); if(fin->link) connect(fin->link, fac_in); @@ -1171,4 +1171,3 @@ void ShaderGraph::dump_graph(const char *filename) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h index 5d986ae4827..426522066b3 100644 --- a/intern/cycles/render/graph.h +++ b/intern/cycles/render/graph.h @@ -165,7 +165,7 @@ public: int id; /* index in graph node array */ ShaderBump bump; /* for bump mapping utility */ - + ShaderNodeSpecialType special_type; /* special node type */ /* ** Selective nodes compilation ** */ @@ -294,4 +294,3 @@ protected: CCL_NAMESPACE_END #endif /* __GRAPH_H__ */ - diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp index bfbacf0f353..fa280fec01f 100644 --- a/intern/cycles/render/image.cpp +++ b/intern/cycles/render/image.cpp @@ -1067,4 +1067,3 @@ void ImageManager::device_free(Device *device) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/image.h b/intern/cycles/render/image.h index 59b9f9ea28d..c9667fb77a9 100644 --- a/intern/cycles/render/image.h +++ b/intern/cycles/render/image.h @@ -171,4 +171,3 @@ private: CCL_NAMESPACE_END #endif /* __IMAGE_H__ */ - diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp index 9c276bcab31..d86eb8fc5d3 100644 --- a/intern/cycles/render/integrator.cpp +++ b/intern/cycles/render/integrator.cpp @@ -118,7 +118,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene } /* Transparent Shadows - * We only need to enable transparent shadows, if we actually have + * We only need to enable transparent shadows, if we actually have * transparent shaders in the scene. Otherwise we can disable it * to improve performance a bit. */ kintegrator->transparent_shadows = false; @@ -141,7 +141,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene kintegrator->use_ambient_occlusion = ((Pass::contains(scene->film->passes, PASS_AO)) || dscene->data.background.ao_factor != 0.0f); - + kintegrator->sample_clamp_direct = (sample_clamp_direct == 0.0f)? FLT_MAX: sample_clamp_direct*3.0f; kintegrator->sample_clamp_indirect = (sample_clamp_indirect == 0.0f)? FLT_MAX: sample_clamp_indirect*3.0f; @@ -236,4 +236,3 @@ void Integrator::tag_update(Scene *scene) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/integrator.h b/intern/cycles/render/integrator.h index 3cb430d72b4..f68400ac416 100644 --- a/intern/cycles/render/integrator.h +++ b/intern/cycles/render/integrator.h @@ -75,7 +75,7 @@ public: NUM_METHODS, }; - + Method method; SamplingPattern sampling_pattern; @@ -95,4 +95,3 @@ public: CCL_NAMESPACE_END #endif /* __INTEGRATOR_H__ */ - diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index 94072d7da09..49cfae4888b 100644 --- a/intern/cycles/render/light.cpp +++ b/intern/cycles/render/light.cpp @@ -763,7 +763,7 @@ void LightManager::device_update_points(Device *, } float invarea = (area != 0.0f)? 1.0f/area: 1.0f; float3 dir = light->dir; - + dir = safe_normalize(dir); if(light->use_mis && area != 0.0f) @@ -792,7 +792,7 @@ void LightManager::device_update_points(Device *, float spot_angle = cosf(light->spot_angle*0.5f); float spot_smooth = (1.0f - spot_angle)*light->spot_smooth; float3 dir = light->dir; - + dir = safe_normalize(dir); if(light->use_mis && radius > 0.0f) @@ -1034,4 +1034,3 @@ void LightManager::device_update_ies(DeviceScene *dscene) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/light.h b/intern/cycles/render/light.h index acbbdd15ddf..ec957c7cc68 100644 --- a/intern/cycles/render/light.h +++ b/intern/cycles/render/light.h @@ -141,4 +141,3 @@ protected: CCL_NAMESPACE_END #endif /* __LIGHT_H__ */ - diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h index e370f8a2021..e7dc1c8e5cf 100644 --- a/intern/cycles/render/mesh.h +++ b/intern/cycles/render/mesh.h @@ -388,4 +388,3 @@ protected: CCL_NAMESPACE_END #endif /* __MESH_H__ */ - diff --git a/intern/cycles/render/mesh_displace.cpp b/intern/cycles/render/mesh_displace.cpp index ad2a5713bcb..53b9bfa3451 100644 --- a/intern/cycles/render/mesh_displace.cpp +++ b/intern/cycles/render/mesh_displace.cpp @@ -89,7 +89,7 @@ bool MeshManager::displace(Device *device, DeviceScene *dscene, Scene *scene, Me int object = object_index; int prim = mesh->tri_offset + i; float u, v; - + switch(j) { case 0: u = 1.0f; @@ -113,7 +113,7 @@ bool MeshManager::displace(Device *device, DeviceScene *dscene, Scene *scene, Me if(d_input_size == 0) return false; - + /* run device task */ device_vector<float4> d_output(device, "displace_output", MEM_READ_WRITE); d_output.alloc(d_input_size); @@ -319,4 +319,3 @@ bool MeshManager::displace(Device *device, DeviceScene *dscene, Scene *scene, Me } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/mesh_subdivision.cpp b/intern/cycles/render/mesh_subdivision.cpp index 9dd81eb6700..13fda99e9cc 100644 --- a/intern/cycles/render/mesh_subdivision.cpp +++ b/intern/cycles/render/mesh_subdivision.cpp @@ -613,4 +613,3 @@ void Mesh::tessellate(DiagSplit *split) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index e7f13f3123f..7e40b99abdd 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -82,7 +82,7 @@ Transform TextureMapping::compute_transform() mmat[1][y_mapping-1] = 1.0f; if(z_mapping != NONE) mmat[2][z_mapping-1] = 1.0f; - + float3 scale_clamped = scale; if(type == TEXTURE || type == NORMAL) { @@ -94,7 +94,7 @@ Transform TextureMapping::compute_transform() if(fabsf(scale.z) < 1e-5f) scale_clamped.z = signf(scale.z)*1e-5f; } - + Transform smat = transform_scale(scale_clamped); Transform rmat = transform_euler(rotation); Transform tmat = transform_translate(translation); @@ -137,12 +137,12 @@ bool TextureMapping::skip() return false; if(scale != make_float3(1.0f, 1.0f, 1.0f)) return false; - + if(x_mapping != X || y_mapping != Y || z_mapping != Z) return false; if(use_minmax) return false; - + return true; } @@ -520,7 +520,7 @@ void EnvironmentTextureNode::compile(SVMCompiler& compiler) compiler.stack_assign_if_linked(alpha_out), srgb), projection); - + tex_mapping.compile_end(compiler, vector_in, vector_offset); } else { @@ -612,7 +612,7 @@ static void sky_texture_precompute_old(SunSky *sunsky, float3 dir, float turbidi * zenith_Y/x/y is now radiance_x/y/z * perez_Y/x/y is now config_x/y/z */ - + float2 spherical = sky_spherical_coordinates(dir); float theta = spherical.x; float phi = spherical.y; @@ -676,12 +676,12 @@ static void sky_texture_precompute_new(SunSky *sunsky, float3 dir, float turbidi float2 spherical = sky_spherical_coordinates(dir); float theta = spherical.x; float phi = spherical.y; - + /* Clamp Turbidity */ - turbidity = clamp(turbidity, 0.0f, 10.0f); - + turbidity = clamp(turbidity, 0.0f, 10.0f); + /* Clamp to Horizon */ - theta = clamp(theta, 0.0f, M_PI_2_F); + theta = clamp(theta, 0.0f, M_PI_2_F); sunsky->theta = theta; sunsky->phi = phi; @@ -773,7 +773,7 @@ void SkyTextureNode::compile(OSLCompiler& compiler) sky_texture_precompute_new(&sunsky, sun_direction, turbidity, ground_albedo); else assert(false); - + compiler.parameter(this, "type"); compiler.parameter("theta", sunsky.theta); compiler.parameter("phi", sunsky.phi); @@ -1296,7 +1296,7 @@ void CheckerTextureNode::compile(SVMCompiler& compiler) ShaderInput *color1_in = input("Color1"); ShaderInput *color2_in = input("Color2"); ShaderInput *scale_in = input("Scale"); - + ShaderOutput *color_out = output("Color"); ShaderOutput *fac_out = output("Fac"); @@ -1371,7 +1371,7 @@ void BrickTextureNode::compile(SVMCompiler& compiler) ShaderInput *bias_in = input("Bias"); ShaderInput *brick_width_in = input("Brick Width"); ShaderInput *row_height_in = input("Row Height"); - + ShaderOutput *color_out = output("Color"); ShaderOutput *fac_out = output("Fac"); @@ -1393,7 +1393,7 @@ void BrickTextureNode::compile(SVMCompiler& compiler) compiler.stack_assign_if_linked(color_out), compiler.stack_assign_if_linked(fac_out), compiler.stack_assign_if_linked(mortar_smooth_in))); - + compiler.add_node(compiler.encode_uchar4(offset_frequency, squash_frequency), __float_as_int(scale), __float_as_int(mortar_size), @@ -2307,7 +2307,7 @@ ToonBsdfNode::ToonBsdfNode() void ToonBsdfNode::compile(SVMCompiler& compiler) { closure = component; - + BsdfNode::compile(compiler, input("Size"), input("Smooth")); } @@ -2861,7 +2861,7 @@ void VolumeNode::compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput compiler.add_node(NODE_CLOSURE_WEIGHT, compiler.stack_assign(color_in)); else compiler.add_node(NODE_CLOSURE_SET_WEIGHT, color); - + compiler.add_node(NODE_CLOSURE_VOLUME, compiler.encode_uchar4(closure, (param1)? compiler.stack_assign(param1): SVM_STACK_INVALID, @@ -3155,7 +3155,7 @@ void GeometryNode::compile(SVMCompiler& compiler) geom_node = NODE_GEOMETRY_BUMP_DY; attr_node = NODE_ATTR_BUMP_DY; } - + out = output("Position"); if(!out->links.empty()) { compiler.add_node(geom_node, NODE_GEOM_P, compiler.stack_assign(out)); @@ -3284,7 +3284,7 @@ void TextureCoordinateNode::compile(SVMCompiler& compiler) attr_node = NODE_ATTR_BUMP_DY; geom_node = NODE_GEOMETRY_BUMP_DY; } - + out = output("Generated"); if(!out->links.empty()) { if(compiler.background) { @@ -3360,7 +3360,7 @@ void TextureCoordinateNode::compile(OSLCompiler& compiler) compiler.parameter("bump_offset", "dy"); else compiler.parameter("bump_offset", "center"); - + if(compiler.background) compiler.parameter("is_background", true); if(compiler.output_type() == SHADER_TYPE_VOLUME) @@ -3522,7 +3522,7 @@ void LightPathNode::compile(SVMCompiler& compiler) if(!out->links.empty()) { compiler.add_node(NODE_LIGHT_PATH, NODE_LP_transmission, compiler.stack_assign(out)); } - + out = output("Is Volume Scatter Ray"); if(!out->links.empty()) { compiler.add_node(NODE_LIGHT_PATH, NODE_LP_volume_scatter, compiler.stack_assign(out)); @@ -3532,7 +3532,7 @@ void LightPathNode::compile(SVMCompiler& compiler) if(!out->links.empty()) { compiler.add_node(NODE_LIGHT_PATH, NODE_LP_ray_length, compiler.stack_assign(out)); } - + out = output("Ray Depth"); if(!out->links.empty()) { compiler.add_node(NODE_LIGHT_PATH, NODE_LP_ray_depth, compiler.stack_assign(out)); @@ -3725,7 +3725,7 @@ void ParticleInfoNode::attributes(Shader *shader, AttributeRequestSet *attribute void ParticleInfoNode::compile(SVMCompiler& compiler) { ShaderOutput *out; - + out = output("Index"); if(!out->links.empty()) { compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_INDEX, compiler.stack_assign(out)); @@ -3735,22 +3735,22 @@ void ParticleInfoNode::compile(SVMCompiler& compiler) if(!out->links.empty()) { compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_RANDOM, compiler.stack_assign(out)); } - + out = output("Age"); if(!out->links.empty()) { compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_AGE, compiler.stack_assign(out)); } - + out = output("Lifetime"); if(!out->links.empty()) { compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_LIFETIME, compiler.stack_assign(out)); } - + out = output("Location"); if(!out->links.empty()) { compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_LOCATION, compiler.stack_assign(out)); } - + /* quaternion data is not yet supported by Cycles */ #if 0 out = output("Rotation"); @@ -3758,17 +3758,17 @@ void ParticleInfoNode::compile(SVMCompiler& compiler) compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_ROTATION, compiler.stack_assign(out)); } #endif - + out = output("Size"); if(!out->links.empty()) { compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_SIZE, compiler.stack_assign(out)); } - + out = output("Velocity"); if(!out->links.empty()) { compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_VELOCITY, compiler.stack_assign(out)); } - + out = output("Angular Velocity"); if(!out->links.empty()) { compiler.add_node(NODE_PARTICLE_INFO, NODE_INFO_PAR_ANGULAR_VELOCITY, compiler.stack_assign(out)); @@ -3821,7 +3821,7 @@ void HairInfoNode::attributes(Shader *shader, AttributeRequestSet *attributes) void HairInfoNode::compile(SVMCompiler& compiler) { ShaderOutput *out; - + out = output("Is Strand"); if(!out->links.empty()) { compiler.add_node(NODE_HAIR_INFO, NODE_INFO_CURVE_IS_STRAND, compiler.stack_assign(out)); @@ -4744,7 +4744,7 @@ void AttributeNode::compile(OSLCompiler& compiler) compiler.parameter("bump_offset", "dy"); else compiler.parameter("bump_offset", "center"); - + if(Attribute::name_standard(attribute.c_str()) != ATTR_STD_NONE) compiler.parameter("name", (string("geom:") + attribute.c_str()).c_str()); else @@ -5550,7 +5550,7 @@ void RGBRampNode::compile(OSLCompiler& compiler) compiler.parameter_color_array("ramp_color", ramp); compiler.parameter_array("ramp_alpha", ramp_alpha.data(), ramp_alpha.size()); compiler.parameter(this, "interpolate"); - + compiler.add(this, "node_rgb_ramp"); } @@ -5583,7 +5583,7 @@ void SetNormalNode::compile(SVMCompiler& compiler) void SetNormalNode::compile(OSLCompiler& compiler) { - compiler.add(this, "node_set_normal"); + compiler.add(this, "node_set_normal"); } /* OSLNode */ @@ -5704,7 +5704,7 @@ void NormalMapNode::attributes(Shader *shader, AttributeRequestSet *attributes) attributes->add(ATTR_STD_VERTEX_NORMAL); } - + ShaderNode::attributes(shader, attributes); } @@ -5749,7 +5749,7 @@ void NormalMapNode::compile(OSLCompiler& compiler) } compiler.parameter(this, "space"); - compiler.add(this, "node_normal_map"); + compiler.add(this, "node_normal_map"); } /* Tangent */ @@ -5794,7 +5794,7 @@ void TangentNode::attributes(Shader *shader, AttributeRequestSet *attributes) else attributes->add(ATTR_STD_GENERATED); } - + ShaderNode::attributes(shader, attributes); } @@ -5830,7 +5830,7 @@ void TangentNode::compile(OSLCompiler& compiler) compiler.parameter(this, "direction_type"); compiler.parameter(this, "axis"); - compiler.add(this, "node_tangent"); + compiler.add(this, "node_tangent"); } /* Bevel */ diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h index 996c582d206..860d50242e9 100644 --- a/intern/cycles/render/nodes.h +++ b/intern/cycles/render/nodes.h @@ -1123,4 +1123,3 @@ public: CCL_NAMESPACE_END #endif /* __NODES_H__ */ - diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index 4d64d841206..e3f35c366d6 100644 --- a/intern/cycles/render/object.cpp +++ b/intern/cycles/render/object.cpp @@ -183,7 +183,7 @@ void Object::apply_transform(bool apply_to_motion) { if(!mesh || tfm == transform_identity()) return; - + /* triangles */ if(mesh->verts.size()) { /* store matrix to transform later. when accessing these as attributes we @@ -194,7 +194,7 @@ void Object::apply_transform(bool apply_to_motion) /* apply to mesh vertices */ for(size_t i = 0; i < mesh->verts.size(); i++) mesh->verts[i] = transform_point(&tfm, mesh->verts[i]); - + if(apply_to_motion) { Attribute *attr = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION); @@ -840,4 +840,3 @@ void ObjectManager::tag_update(Scene *scene) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/object.h b/intern/cycles/render/object.h index c7212ae25f9..b80c4aef70b 100644 --- a/intern/cycles/render/object.h +++ b/intern/cycles/render/object.h @@ -129,4 +129,3 @@ protected: CCL_NAMESPACE_END #endif /* __OBJECT_H__ */ - diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index dde622bff8a..fdd872f62b9 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -122,7 +122,7 @@ void OSLShaderManager::device_update(Device *device, DeviceScene *dscene, Scene shader->need_update = false; need_update = false; - + /* set texture system */ scene->image_manager->set_osl_texture_system((void*)ts); @@ -578,7 +578,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderInput *input) /* strip whitespace */ while((i = sname.find(" ")) != string::npos) sname.replace(i, 1, ""); - + /* if output exists with the same name, add "In" suffix */ foreach(ShaderOutput *output, node->outputs) { if(input->name() == output->name()) { @@ -586,7 +586,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderInput *input) break; } } - + return sname; } @@ -598,7 +598,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderOutput *output) /* strip whitespace */ while((i = sname.find(" ")) != string::npos) sname.replace(i, 1, ""); - + /* if input exists with the same name, add "Out" suffix */ foreach(ShaderInput *input, node->inputs) { if(input->name() == output->name()) { @@ -606,7 +606,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderOutput *output) break; } } - + return sname; } @@ -614,7 +614,7 @@ bool OSLCompiler::node_skip_input(ShaderNode *node, ShaderInput *input) { /* exception for output node, only one input is actually used * depending on the current shader type */ - + if(input->flags() & SocketType::SVM_INTERNAL) return true; @@ -704,7 +704,7 @@ void OSLCompiler::add(ShaderNode *node, const char *name, bool isfilepath) ss->Shader("displacement", name, id(node).c_str()); else assert(0); - + /* link inputs to other nodes */ foreach(ShaderInput *input, node->inputs) { if(input->link) { @@ -1250,4 +1250,3 @@ void OSLCompiler::parameter_color_array(const char * /*name*/, const array<float #endif /* WITH_OSL */ CCL_NAMESPACE_END - diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h index 7a3208c402a..09d1a54d0b9 100644 --- a/intern/cycles/render/osl.h +++ b/intern/cycles/render/osl.h @@ -171,4 +171,3 @@ private: CCL_NAMESPACE_END #endif /* __OSL_H__ */ - diff --git a/intern/cycles/render/particles.cpp b/intern/cycles/render/particles.cpp index e4be3306d7e..0583556c8a9 100644 --- a/intern/cycles/render/particles.cpp +++ b/intern/cycles/render/particles.cpp @@ -61,12 +61,12 @@ void ParticleSystemManager::device_update_particles(Device *, DeviceScene *dscen int num_particles = 1; for(size_t j = 0; j < scene->particle_systems.size(); j++) num_particles += scene->particle_systems[j]->particles.size(); - + KernelParticle *kparticles = dscene->particles.alloc(num_particles); - + /* dummy particle */ memset(kparticles, 0, sizeof(KernelParticle)); - + int i = 1; for(size_t j = 0; j < scene->particle_systems.size(); j++) { ParticleSystem *psys = scene->particle_systems[j]; @@ -74,7 +74,7 @@ void ParticleSystemManager::device_update_particles(Device *, DeviceScene *dscen for(size_t k = 0; k < psys->particles.size(); k++) { /* pack in texture */ Particle& pa = psys->particles[k]; - + kparticles[i].index = pa.index; kparticles[i].age = pa.age; kparticles[i].lifetime = pa.lifetime; @@ -83,13 +83,13 @@ void ParticleSystemManager::device_update_particles(Device *, DeviceScene *dscen kparticles[i].location = float3_to_float4(pa.location); kparticles[i].velocity = float3_to_float4(pa.velocity); kparticles[i].angular_velocity = float3_to_float4(pa.angular_velocity); - + i++; - + if(progress.get_cancel()) return; } } - + dscene->particles.copy_to_device(); } @@ -105,9 +105,9 @@ void ParticleSystemManager::device_update(Device *device, DeviceScene *dscene, S progress.set_status("Updating Particle Systems", "Copying Particles to device"); device_update_particles(device, dscene, scene, progress); - + if(progress.get_cancel()) return; - + need_update = false; } @@ -122,4 +122,3 @@ void ParticleSystemManager::tag_update(Scene * /*scene*/) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/particles.h b/intern/cycles/render/particles.h index 66d46114b3e..7e7afd5d054 100644 --- a/intern/cycles/render/particles.h +++ b/intern/cycles/render/particles.h @@ -69,4 +69,3 @@ public: CCL_NAMESPACE_END #endif /* __PARTICLES_H__ */ - diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp index c0f1ae0445e..1d65ef65980 100644 --- a/intern/cycles/render/scene.cpp +++ b/intern/cycles/render/scene.cpp @@ -319,7 +319,7 @@ bool Scene::need_global_attribute(AttributeStandard std) return need_motion() != MOTION_NONE; else if(std == ATTR_STD_MOTION_VERTEX_NORMAL) return need_motion() == MOTION_BLUR; - + return false; } @@ -380,4 +380,3 @@ void Scene::device_free() } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h index 6c67433c9fc..713eba623b1 100644 --- a/intern/cycles/render/scene.h +++ b/intern/cycles/render/scene.h @@ -267,4 +267,3 @@ protected: CCL_NAMESPACE_END #endif /* __SCENE_H__ */ - diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index 3106ee53832..d0aa985b035 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -364,7 +364,7 @@ bool Session::acquire_tile(Device *tile_device, RenderTile& rtile) if(!tile_manager.next_tile(tile, device_num)) return false; - + /* fill render tile */ rtile.x = tile_manager.state.buffer.full_x + tile->x; rtile.y = tile_manager.state.buffer.full_y + tile->y; @@ -916,7 +916,7 @@ void Session::update_status_time(bool show_pause, bool show_done) substatus = string_printf("Path Tracing Sample %d/%d", progressive_sample+1, num_samples); - + if(show_pause) { status = "Paused"; } @@ -941,7 +941,7 @@ void Session::render() /* Add path trace task. */ DeviceTask task(DeviceTask::RENDER); - + task.acquire_tile = function_bind(&Session::acquire_tile, this, _1, _2); task.release_tile = function_bind(&Session::release_tile, this, _1); task.map_neighbor_tiles = function_bind(&Session::map_neighbor_tiles, this, _1, _2); diff --git a/intern/cycles/render/session.h b/intern/cycles/render/session.h index e63cad0d977..61f62f8e712 100644 --- a/intern/cycles/render/session.h +++ b/intern/cycles/render/session.h @@ -237,4 +237,3 @@ protected: CCL_NAMESPACE_END #endif /* __SESSION_H__ */ - diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp index 69f84a62a9f..e428e174712 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -314,7 +314,7 @@ void Shader::tag_update(Scene *scene) if(has_displacement && displacement_method == DISPLACE_BOTH) { attributes.add(ATTR_STD_POSITION_UNDISPLACED); } - + /* compare if the attributes changed, mesh manager will check * need_update_mesh, update the relevant meshes and clear it. */ if(attributes.modified(prev_attributes)) { @@ -399,7 +399,7 @@ ShaderManager *ShaderManager::create(Scene *scene, int shadingsystem) { manager = new SVMShaderManager(); } - + add_default(scene); return manager; @@ -414,7 +414,7 @@ uint ShaderManager::get_attribute_id(ustring name) if(it != unique_attribute_id.end()) return it->second; - + uint id = (uint)ATTR_STD_NUM + unique_attribute_id.size(); unique_attribute_id[name] = id; return id; @@ -433,10 +433,10 @@ int ShaderManager::get_shader_id(Shader *shader, bool smooth) /* smooth flag */ if(smooth) id |= SHADER_SMOOTH_NORMAL; - + /* default flags */ id |= SHADER_CAST_SHADOW|SHADER_AREA_LIGHT; - + return id; } @@ -697,4 +697,3 @@ float ShaderManager::linear_rgb_to_gray(float3 c) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h index d787c3b266b..e898d984f5a 100644 --- a/intern/cycles/render/shader.h +++ b/intern/cycles/render/shader.h @@ -156,7 +156,7 @@ public: }; /* Shader Manager virtual base class - * + * * From this the SVM and OSL shader managers are derived, that do the actual * shader compiling and device updating. */ @@ -224,4 +224,3 @@ protected: CCL_NAMESPACE_END #endif /* __SHADER_H__ */ - diff --git a/intern/cycles/render/sobol.cpp b/intern/cycles/render/sobol.cpp index 6906667ac19..01dfafa2ed9 100644 --- a/intern/cycles/render/sobol.cpp +++ b/intern/cycles/render/sobol.cpp @@ -7,7 +7,7 @@ * http://web.maths.unsw.edu.au/~fkuo/sobol/ * * From these papers: - * + * * S. Joe and F. Y. Kuo, Remark on Algorithm 659: Implementing Sobol's quasirandom * sequence generator, ACM Trans. Math. Softw. 29, 49-57 (2003) * @@ -18,22 +18,22 @@ /* Copyright (c) 2008, Frances Y. Kuo and Stephen Joe * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * * Neither the names of the copyright holders nor the names of the * University of New South Wales and the University of Waikato * and its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -21284,21 +21284,20 @@ void sobol_generate_direction_vectors(uint vectors[][SOBOL_BITS], int dimensions if(L <= s) { for(uint i = 0; i < L; i++) - v[i] = m[i] << (31-i); + v[i] = m[i] << (31-i); } else { for(uint i = 0; i < s; i++) - v[i] = m[i] << (31-i); + v[i] = m[i] << (31-i); for(uint i = s; i < L; i++) { - v[i] = v[i-s] ^ (v[i-s] >> s); + v[i] = v[i-s] ^ (v[i-s] >> s); - for(uint k = 1; k < s; k++) - v[i] ^= (((a >> (s-1-k)) & 1) * v[i-k]); + for(uint k = 1; k < s; k++) + v[i] ^= (((a >> (s-1-k)) & 1) * v[i-k]); } } } } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/sobol.h b/intern/cycles/render/sobol.h index 9fbce4e14a5..d38857d2b35 100644 --- a/intern/cycles/render/sobol.h +++ b/intern/cycles/render/sobol.h @@ -29,4 +29,3 @@ void sobol_generate_direction_vectors(uint vectors[][SOBOL_BITS], int dimensions CCL_NAMESPACE_END #endif /* __SOBOL_H__ */ - diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp index 626f160786f..44b7eeec6db 100644 --- a/intern/cycles/render/svm.cpp +++ b/intern/cycles/render/svm.cpp @@ -71,12 +71,12 @@ void SVMShaderManager::device_update_shader(Scene *scene, scene->light_manager->need_update = true; } - /* The copy needs to be done inside the lock, if another thread resizes the array - * while memcpy is running, it'll be copying into possibly invalid/freed ram. + /* The copy needs to be done inside the lock, if another thread resizes the array + * while memcpy is running, it'll be copying into possibly invalid/freed ram. */ size_t global_nodes_size = global_svm_nodes->size(); global_svm_nodes->resize(global_nodes_size + svm_nodes.size()); - + /* Offset local SVM nodes to a global address space. */ int4& jump_node = (*global_svm_nodes)[shader->id]; jump_node.y = svm_nodes[0].y + global_nodes_size - 1; @@ -173,7 +173,7 @@ SVMCompiler::SVMCompiler(ShaderManager *shader_manager_, int SVMCompiler::stack_size(SocketType::Type type) { int size = 0; - + switch(type) { case SocketType::FLOAT: case SocketType::INT: @@ -192,14 +192,14 @@ int SVMCompiler::stack_size(SocketType::Type type) assert(0); break; } - + return size; } int SVMCompiler::stack_find_offset(int size) { int offset = -1; - + /* find free space in stack & mark as used */ for(int i = 0, num_unused = 0; i < SVM_STACK_SIZE; i++) { if(active_stack.users[i]) num_unused = 0; @@ -413,7 +413,7 @@ bool SVMCompiler::node_skip_input(ShaderNode * /*node*/, ShaderInput *input) /* nasty exception .. */ if(current_type == SHADER_TYPE_DISPLACEMENT && input->link && input->link->parent->special_type == SHADER_SPECIAL_TYPE_BUMP) return true; - + return false; } @@ -715,7 +715,7 @@ void SVMCompiler::compile_type(Shader *shader, ShaderGraph *graph, ShaderType ty /* get input in output node */ ShaderNode *node = graph->output(); ShaderInput *clin = NULL; - + switch(type) { case SHADER_TYPE_SURFACE: clin = node->input("Surface"); @@ -756,9 +756,9 @@ void SVMCompiler::compile_type(Shader *shader, ShaderGraph *graph, ShaderType ty if(shader->used) { if(clin->link) { bool generate = false; - + switch(type) { - case SHADER_TYPE_SURFACE: /* generate surface shader */ + case SHADER_TYPE_SURFACE: /* generate surface shader */ generate = true; shader->has_surface = true; break; @@ -936,4 +936,3 @@ SVMCompiler::CompilerState::CompilerState(ShaderGraph *graph) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/svm.h b/intern/cycles/render/svm.h index 7cf1e4ad791..1d0613bbfdc 100644 --- a/intern/cycles/render/svm.h +++ b/intern/cycles/render/svm.h @@ -224,4 +224,3 @@ protected: CCL_NAMESPACE_END #endif /* __SVM_H__ */ - diff --git a/intern/cycles/render/tables.cpp b/intern/cycles/render/tables.cpp index 536fdd0775e..ddbb138f059 100644 --- a/intern/cycles/render/tables.cpp +++ b/intern/cycles/render/tables.cpp @@ -115,4 +115,3 @@ void LookupTables::remove_table(size_t *offset) } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/tables.h b/intern/cycles/render/tables.h index bc261c2a74d..09d961a9c3c 100644 --- a/intern/cycles/render/tables.h +++ b/intern/cycles/render/tables.h @@ -51,4 +51,3 @@ public: CCL_NAMESPACE_END #endif /* __TABLES_H__ */ - diff --git a/intern/cycles/render/tile.cpp b/intern/cycles/render/tile.cpp index a388f5dfc8b..dc863b067b0 100644 --- a/intern/cycles/render/tile.cpp +++ b/intern/cycles/render/tile.cpp @@ -535,4 +535,3 @@ int TileManager::get_num_effective_samples() } CCL_NAMESPACE_END - diff --git a/intern/cycles/render/tile.h b/intern/cycles/render/tile.h index 2692c7cf9f0..f72f653f4c2 100644 --- a/intern/cycles/render/tile.h +++ b/intern/cycles/render/tile.h @@ -155,4 +155,3 @@ protected: CCL_NAMESPACE_END #endif /* __TILE_H__ */ - diff --git a/intern/cycles/subd/subd_dice.cpp b/intern/cycles/subd/subd_dice.cpp index 8c426da4acf..c5ac54cfcc8 100644 --- a/intern/cycles/subd/subd_dice.cpp +++ b/intern/cycles/subd/subd_dice.cpp @@ -348,4 +348,3 @@ void QuadDice::dice(SubPatch& sub, EdgeFactors& ef) } CCL_NAMESPACE_END - diff --git a/intern/cycles/subd/subd_dice.h b/intern/cycles/subd/subd_dice.h index c0e32be18c4..4617c782b3a 100644 --- a/intern/cycles/subd/subd_dice.h +++ b/intern/cycles/subd/subd_dice.h @@ -81,7 +81,7 @@ public: * Edge tessellation factors and subpatch coordinates are as follows: * * tu1 - * P01 --------- P11 + * P01 --------- P11 * | | * tv0 | | tv1 * | | @@ -135,4 +135,3 @@ public: CCL_NAMESPACE_END #endif /* __SUBD_DICE_H__ */ - diff --git a/intern/cycles/subd/subd_patch.cpp b/intern/cycles/subd/subd_patch.cpp index fa2fe2bf113..f8f5aa25d19 100644 --- a/intern/cycles/subd/subd_patch.cpp +++ b/intern/cycles/subd/subd_patch.cpp @@ -80,7 +80,7 @@ BoundBox LinearQuadPatch::bound() for(int i = 0; i < 4; i++) bbox.grow(hull[i]); - + return bbox; } @@ -110,9 +110,8 @@ BoundBox BicubicPatch::bound() for(int i = 0; i < 16; i++) bbox.grow(hull[i]); - + return bbox; } CCL_NAMESPACE_END - diff --git a/intern/cycles/subd/subd_patch.h b/intern/cycles/subd/subd_patch.h index 1bb81588835..64ec8f70951 100644 --- a/intern/cycles/subd/subd_patch.h +++ b/intern/cycles/subd/subd_patch.h @@ -57,4 +57,3 @@ public: CCL_NAMESPACE_END #endif /* __SUBD_PATCH_H__ */ - diff --git a/intern/cycles/subd/subd_patch_table.cpp b/intern/cycles/subd/subd_patch_table.cpp index 63bf673a90b..13a6f284542 100644 --- a/intern/cycles/subd/subd_patch_table.cpp +++ b/intern/cycles/subd/subd_patch_table.cpp @@ -294,4 +294,3 @@ void PackedPatchTable::copy_adjusting_offsets(uint* dest, int doffset) } CCL_NAMESPACE_END - diff --git a/intern/cycles/subd/subd_patch_table.h b/intern/cycles/subd/subd_patch_table.h index 907f2dd6c28..45be7051992 100644 --- a/intern/cycles/subd/subd_patch_table.h +++ b/intern/cycles/subd/subd_patch_table.h @@ -60,4 +60,3 @@ struct PackedPatchTable { CCL_NAMESPACE_END #endif /* __SUBD_PATCH_TABLE_H__ */ - diff --git a/intern/cycles/subd/subd_split.cpp b/intern/cycles/subd/subd_split.cpp index d3bed6a5c53..76261243359 100644 --- a/intern/cycles/subd/subd_split.cpp +++ b/intern/cycles/subd/subd_split.cpp @@ -86,7 +86,7 @@ int DiagSplit::T(Patch *patch, float2 Pstart, float2 Pend) if(tmax - tmin > params.split_threshold) return DSPLIT_NON_UNIFORM; - + return tmax; } @@ -258,4 +258,3 @@ void DiagSplit::split_quad(Patch *patch, QuadDice::SubPatch *subpatch) } CCL_NAMESPACE_END - diff --git a/intern/cycles/subd/subd_split.h b/intern/cycles/subd/subd_split.h index f869cc6a48e..7a276b35382 100644 --- a/intern/cycles/subd/subd_split.h +++ b/intern/cycles/subd/subd_split.h @@ -57,4 +57,3 @@ public: CCL_NAMESPACE_END #endif /* __SUBD_SPLIT_H__ */ - diff --git a/intern/cycles/util/util_algorithm.h b/intern/cycles/util/util_algorithm.h index 5c79c00cc98..eb874713d43 100644 --- a/intern/cycles/util/util_algorithm.h +++ b/intern/cycles/util/util_algorithm.h @@ -30,4 +30,3 @@ using std::remove; CCL_NAMESPACE_END #endif /* __UTIL_ALGORITHM_H__ */ - diff --git a/intern/cycles/util/util_args.h b/intern/cycles/util/util_args.h index a53fc061758..be6f2c2b9f1 100644 --- a/intern/cycles/util/util_args.h +++ b/intern/cycles/util/util_args.h @@ -29,4 +29,3 @@ OIIO_NAMESPACE_USING CCL_NAMESPACE_END #endif /* __UTIL_ARGS_H__ */ - diff --git a/intern/cycles/util/util_boundbox.h b/intern/cycles/util/util_boundbox.h index ed94ca20211..b1bd5be0df3 100644 --- a/intern/cycles/util/util_boundbox.h +++ b/intern/cycles/util/util_boundbox.h @@ -55,7 +55,7 @@ public: { } - __forceinline void grow(const float3& pt) + __forceinline void grow(const float3& pt) { /* the order of arguments to min is such that if pt is nan, it will not * influence the resulting bounding box */ @@ -63,7 +63,7 @@ public: max = ccl::max(pt, max); } - __forceinline void grow(const float3& pt, float border) + __forceinline void grow(const float3& pt, float border) { float3 shift = make_float3(border, border, border); min = ccl::min(pt - shift, min); @@ -76,7 +76,7 @@ public: grow(bbox.max); } - __forceinline void grow_safe(const float3& pt) + __forceinline void grow_safe(const float3& pt) { /* the order of arguments to min is such that if pt is nan, it will not * influence the resulting bounding box */ @@ -86,7 +86,7 @@ public: } } - __forceinline void grow_safe(const float3& pt, float border) + __forceinline void grow_safe(const float3& pt, float border) { if(isfinite(pt.x) && isfinite(pt.y) && isfinite(pt.z) && isfinite(border)) { float3 shift = make_float3(border, border, border); @@ -101,7 +101,7 @@ public: grow_safe(bbox.max); } - __forceinline void intersect(const BoundBox& bbox) + __forceinline void intersect(const BoundBox& bbox) { min = ccl::max(min, bbox.min); max = ccl::min(max, bbox.max); @@ -283,4 +283,3 @@ public: CCL_NAMESPACE_END #endif /* __UTIL_BOUNDBOX_H__ */ - diff --git a/intern/cycles/util/util_color.h b/intern/cycles/util/util_color.h index 62a9bf8e47d..826db469d25 100644 --- a/intern/cycles/util/util_color.h +++ b/intern/cycles/util/util_color.h @@ -241,4 +241,3 @@ ccl_device float4 color_srgb_to_linear_v4(float4 c) CCL_NAMESPACE_END #endif /* __UTIL_COLOR_H__ */ - diff --git a/intern/cycles/util/util_defines.h b/intern/cycles/util/util_defines.h index 98944a19022..d994d4e08f4 100644 --- a/intern/cycles/util/util_defines.h +++ b/intern/cycles/util/util_defines.h @@ -133,4 +133,3 @@ template<typename T> static inline T decltype_helper(T x) { return x; } #endif #endif /* __UTIL_DEFINES_H__ */ - diff --git a/intern/cycles/util/util_foreach.h b/intern/cycles/util/util_foreach.h index 4f7337107b3..03fcefc67b9 100644 --- a/intern/cycles/util/util_foreach.h +++ b/intern/cycles/util/util_foreach.h @@ -27,4 +27,3 @@ #endif #endif /* __UTIL_FOREACH_H__ */ - diff --git a/intern/cycles/util/util_function.h b/intern/cycles/util/util_function.h index 6d0f0b444a9..958f8b4008c 100644 --- a/intern/cycles/util/util_function.h +++ b/intern/cycles/util/util_function.h @@ -47,4 +47,3 @@ using boost::function; CCL_NAMESPACE_END #endif /* __UTIL_FUNCTION_H__ */ - diff --git a/intern/cycles/util/util_half.h b/intern/cycles/util/util_half.h index f6c507906f3..58f3f903619 100644 --- a/intern/cycles/util/util_half.h +++ b/intern/cycles/util/util_half.h @@ -149,4 +149,3 @@ ccl_device_inline half float_to_half(float f) CCL_NAMESPACE_END #endif /* __UTIL_HALF_H__ */ - diff --git a/intern/cycles/util/util_hash.h b/intern/cycles/util/util_hash.h index 2307ca158f0..a8a5076fbb3 100644 --- a/intern/cycles/util/util_hash.h +++ b/intern/cycles/util/util_hash.h @@ -69,4 +69,3 @@ ccl_device_inline float hash_int_01(uint k) CCL_NAMESPACE_END #endif /* __UTIL_HASH_H__ */ - diff --git a/intern/cycles/util/util_list.h b/intern/cycles/util/util_list.h index 6cb27e6defe..f555b001186 100644 --- a/intern/cycles/util/util_list.h +++ b/intern/cycles/util/util_list.h @@ -26,4 +26,3 @@ using std::list; CCL_NAMESPACE_END #endif /* __UTIL_LIST_H__ */ - diff --git a/intern/cycles/util/util_map.h b/intern/cycles/util/util_map.h index 46c2885f8b0..b3d887f093c 100644 --- a/intern/cycles/util/util_map.h +++ b/intern/cycles/util/util_map.h @@ -54,4 +54,3 @@ using std::unordered_map; CCL_NAMESPACE_END #endif /* __UTIL_MAP_H__ */ - diff --git a/intern/cycles/util/util_md5.cpp b/intern/cycles/util/util_md5.cpp index 749760d84f0..7cdd28a4793 100644 --- a/intern/cycles/util/util_md5.cpp +++ b/intern/cycles/util/util_md5.cpp @@ -338,7 +338,7 @@ bool MD5Hash::append_file(const string& filepath) bool success = (ferror(f) == 0); fclose(f); - + return success; } @@ -376,7 +376,7 @@ string MD5Hash::get_hex() for(int i = 0; i < 16; i++) sprintf(buf + i*2, "%02X", (unsigned int)digest[i]); buf[sizeof(buf)-1] = '\0'; - + return string(buf); } @@ -388,4 +388,3 @@ string util_md5_string(const string& str) } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_md5.h b/intern/cycles/util/util_md5.h index b043b591e67..9023ccee4c2 100644 --- a/intern/cycles/util/util_md5.h +++ b/intern/cycles/util/util_md5.h @@ -59,4 +59,3 @@ string util_md5_string(const string& str); CCL_NAMESPACE_END #endif /* __UTIL_MD5_H__ */ - diff --git a/intern/cycles/util/util_optimization.h b/intern/cycles/util/util_optimization.h index 3c5785c4807..3b3627242d5 100644 --- a/intern/cycles/util/util_optimization.h +++ b/intern/cycles/util/util_optimization.h @@ -69,4 +69,3 @@ #endif #endif /* __UTIL_OPTIMIZATION_H__ */ - diff --git a/intern/cycles/util/util_param.h b/intern/cycles/util/util_param.h index 69bcbf80a78..246b5cb7d63 100644 --- a/intern/cycles/util/util_param.h +++ b/intern/cycles/util/util_param.h @@ -31,4 +31,3 @@ OIIO_NAMESPACE_USING CCL_NAMESPACE_END #endif /* __UTIL_PARAM_H__ */ - diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp index 0e0371928ab..51b7944705e 100644 --- a/intern/cycles/util/util_path.cpp +++ b/intern/cycles/util/util_path.cpp @@ -987,4 +987,3 @@ void path_cache_clear_except(const string& name, const set<string>& except) } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_path.h b/intern/cycles/util/util_path.h index 0e5e2d2c837..738dba94647 100644 --- a/intern/cycles/util/util_path.h +++ b/intern/cycles/util/util_path.h @@ -76,4 +76,3 @@ void path_cache_clear_except(const string& name, const set<string>& except); CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_progress.h b/intern/cycles/util/util_progress.h index 134383e88db..3ef15c5c09a 100644 --- a/intern/cycles/util/util_progress.h +++ b/intern/cycles/util/util_progress.h @@ -366,4 +366,3 @@ protected: CCL_NAMESPACE_END #endif /* __UTIL_PROGRESS_H__ */ - diff --git a/intern/cycles/util/util_projection.h b/intern/cycles/util/util_projection.h index dbcb9877a48..26b4843928c 100644 --- a/intern/cycles/util/util_projection.h +++ b/intern/cycles/util/util_projection.h @@ -174,4 +174,3 @@ ccl_device_inline ProjectionTransform projection_orthographic(float znear, float CCL_NAMESPACE_END #endif /* __UTIL_PROJECTION_H__ */ - diff --git a/intern/cycles/util/util_queue.h b/intern/cycles/util/util_queue.h index f4c802785f9..622f4fe3e47 100644 --- a/intern/cycles/util/util_queue.h +++ b/intern/cycles/util/util_queue.h @@ -26,4 +26,3 @@ using std::queue; CCL_NAMESPACE_END #endif /* __UTIL_LIST_H__ */ - diff --git a/intern/cycles/util/util_rect.h b/intern/cycles/util/util_rect.h index 17a55a14d0b..d13baefe85e 100644 --- a/intern/cycles/util/util_rect.h +++ b/intern/cycles/util/util_rect.h @@ -70,4 +70,3 @@ ccl_device_inline int rect_size(int4 rect) CCL_NAMESPACE_END #endif /* __UTIL_RECT_H__ */ - diff --git a/intern/cycles/util/util_set.h b/intern/cycles/util/util_set.h index c19fa071b37..1d010e19996 100644 --- a/intern/cycles/util/util_set.h +++ b/intern/cycles/util/util_set.h @@ -60,4 +60,3 @@ using std::unordered_set; CCL_NAMESPACE_END #endif /* __UTIL_SET_H__ */ - diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h index 04341451afb..cc7f436c8fe 100644 --- a/intern/cycles/util/util_simd.h +++ b/intern/cycles/util/util_simd.h @@ -111,7 +111,7 @@ __forceinline size_t __popcnt(size_t in) { #endif __forceinline int __bsf(int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else unsigned long r = 0; _BitScanForward(&r,v); return r; @@ -119,7 +119,7 @@ __forceinline int __bsf(int v) { } __forceinline unsigned int __bsf(unsigned int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else unsigned long r = 0; _BitScanForward(&r,v); return r; @@ -143,7 +143,7 @@ __forceinline int __btr(int v, int i) { } __forceinline int bitscan(int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else return __bsf(v); @@ -156,18 +156,18 @@ __forceinline int clz(const int x) return _lzcnt_u32(x); #else if(UNLIKELY(x == 0)) return 32; - return 31 - __bsr(x); + return 31 - __bsr(x); #endif } -__forceinline int __bscf(int& v) +__forceinline int __bscf(int& v) { int i = __bsf(v); v &= v-1; return i; } -__forceinline unsigned int __bscf(unsigned int& v) +__forceinline unsigned int __bscf(unsigned int& v) { unsigned int i = __bsf(v); v &= v-1; @@ -177,7 +177,7 @@ __forceinline unsigned int __bscf(unsigned int& v) #if defined(__KERNEL_64_BIT__) __forceinline size_t __bsf(size_t v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u64(v); #else unsigned long r = 0; _BitScanForward64(&r,v); return r; @@ -212,7 +212,7 @@ __forceinline size_t bitscan(size_t v) { #endif } -__forceinline size_t __bscf(size_t& v) +__forceinline size_t __bscf(size_t& v) { size_t i = __bsf(v); v &= v-1; @@ -274,7 +274,7 @@ __forceinline size_t __btr(size_t v, size_t i) { } __forceinline int bitscan(int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else return __bsf(v); @@ -282,7 +282,7 @@ __forceinline int bitscan(int v) { } __forceinline unsigned int bitscan(unsigned int v) { -#if defined(__KERNEL_AVX2__) +#if defined(__KERNEL_AVX2__) return _tzcnt_u32(v); #else return __bsf(v); @@ -309,11 +309,11 @@ __forceinline int clz(const int x) return _lzcnt_u32(x); #else if(UNLIKELY(x == 0)) return 32; - return 31 - __bsr(x); + return 31 - __bsr(x); #endif } -__forceinline int __bscf(int& v) +__forceinline int __bscf(int& v) { int i = bitscan(v); #if defined(__KERNEL_AVX2__) @@ -324,7 +324,7 @@ __forceinline int __bscf(int& v) return i; } -__forceinline unsigned int __bscf(unsigned int& v) +__forceinline unsigned int __bscf(unsigned int& v) { unsigned int i = bitscan(v); v &= v-1; @@ -332,7 +332,7 @@ __forceinline unsigned int __bscf(unsigned int& v) } #if (defined(__KERNEL_64_BIT__) || defined(__APPLE__)) && !(defined(__ILP32__) && defined(__x86_64__)) -__forceinline size_t __bscf(size_t& v) +__forceinline size_t __bscf(size_t& v) { size_t i = bitscan(v); #if defined(__KERNEL_AVX2__) @@ -375,28 +375,28 @@ __forceinline __m128 _mm_blendv_ps_emu( __m128 value, __m128 input, __m128 mask) #define _mm_blend_ps _mm_blend_ps_emu __forceinline __m128 _mm_blend_ps_emu( __m128 value, __m128 input, const int mask) { - assert(mask < 0x10); return _mm_blendv_ps(value, input, _mm_lookupmask_ps[mask]); + assert(mask < 0x10); return _mm_blendv_ps(value, input, _mm_lookupmask_ps[mask]); } #undef _mm_blendv_epi8 #define _mm_blendv_epi8 _mm_blendv_epi8_emu __forceinline __m128i _mm_blendv_epi8_emu( __m128i value, __m128i input, __m128i mask) { - return _mm_or_si128(_mm_and_si128(mask, input), _mm_andnot_si128(mask, value)); + return _mm_or_si128(_mm_and_si128(mask, input), _mm_andnot_si128(mask, value)); } #undef _mm_min_epi32 #define _mm_min_epi32 _mm_min_epi32_emu __forceinline __m128i _mm_min_epi32_emu( __m128i value, __m128i input) { - return _mm_blendv_epi8(input, value, _mm_cmplt_epi32(value, input)); + return _mm_blendv_epi8(input, value, _mm_cmplt_epi32(value, input)); } #undef _mm_max_epi32 #define _mm_max_epi32 _mm_max_epi32_emu __forceinline __m128i _mm_max_epi32_emu( __m128i value, __m128i input) { - return _mm_blendv_epi8(value, input, _mm_cmplt_epi32(value, input)); + return _mm_blendv_epi8(value, input, _mm_cmplt_epi32(value, input)); } #undef _mm_extract_epi32 @@ -416,7 +416,7 @@ __forceinline int _mm_extract_epi32_emu( __m128i input, const int index) #define _mm_insert_epi32 _mm_insert_epi32_emu __forceinline __m128i _mm_insert_epi32_emu( __m128i value, int input, const int index) { - assert(index >= 0 && index < 4); ((int*)&value)[index] = input; return value; + assert(index >= 0 && index < 4); ((int*)&value)[index] = input; return value; } #undef _mm_insert_ps @@ -487,4 +487,3 @@ CCL_NAMESPACE_END #endif /* __KERNEL_GPU__ */ #endif /* __UTIL_SIMD_TYPES_H__ */ - diff --git a/intern/cycles/util/util_sky_model.cpp b/intern/cycles/util/util_sky_model.cpp index 6dda8469907..526bce4ff88 100644 --- a/intern/cycles/util/util_sky_model.cpp +++ b/intern/cycles/util/util_sky_model.cpp @@ -367,4 +367,3 @@ ArHosekSkyModelState * arhosek_xyz_skymodelstate_alloc_init( } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h index 977976c3fc0..115b133c662 100644 --- a/intern/cycles/util/util_sseb.h +++ b/intern/cycles/util/util_sseb.h @@ -38,7 +38,7 @@ struct sseb //////////////////////////////////////////////////////////////////////////////// /// Constructors, Assignment & Cast Operators //////////////////////////////////////////////////////////////////////////////// - + __forceinline sseb ( ) {} __forceinline sseb ( const sseb& other ) { m128 = other.m128; } __forceinline sseb& operator=( const sseb& other ) { m128 = other.m128; return *this; } @@ -47,10 +47,10 @@ struct sseb __forceinline operator const __m128&( void ) const { return m128; } __forceinline operator const __m128i( void ) const { return _mm_castps_si128(m128); } __forceinline operator const __m128d( void ) const { return _mm_castps_pd(m128); } - + __forceinline sseb ( bool a ) : m128(_mm_lookupmask_ps[(size_t(a) << 3) | (size_t(a) << 2) | (size_t(a) << 1) | size_t(a)]) {} - __forceinline sseb ( bool a, bool b) + __forceinline sseb ( bool a, bool b) : m128(_mm_lookupmask_ps[(size_t(b) << 3) | (size_t(a) << 2) | (size_t(b) << 1) | size_t(a)]) {} __forceinline sseb ( bool a, bool b, bool c, bool d) : m128(_mm_lookupmask_ps[(size_t(d) << 3) | (size_t(c) << 2) | (size_t(b) << 1) | size_t(a)]) {} @@ -103,11 +103,11 @@ __forceinline const sseb operator ^=( sseb& a, const sseb& b ) { return a = a ^ __forceinline const sseb operator !=( const sseb& a, const sseb& b ) { return _mm_xor_ps(a, b); } __forceinline const sseb operator ==( const sseb& a, const sseb& b ) { return _mm_castsi128_ps(_mm_cmpeq_epi32(a, b)); } -__forceinline const sseb select( const sseb& m, const sseb& t, const sseb& f ) { +__forceinline const sseb select( const sseb& m, const sseb& t, const sseb& f ) { #if defined(__KERNEL_SSE41__) - return _mm_blendv_ps(f, t, m); + return _mm_blendv_ps(f, t, m); #else - return _mm_or_ps(_mm_and_ps(m, t), _mm_andnot_ps(m, f)); + return _mm_or_ps(_mm_and_ps(m, t), _mm_andnot_ps(m, f)); #endif } @@ -186,4 +186,3 @@ ccl_device_inline void print_sseb(const char *label, const sseb &a) CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_ssef.h b/intern/cycles/util/util_ssef.h index e9a617bb2cc..b5623860e33 100644 --- a/intern/cycles/util/util_ssef.h +++ b/intern/cycles/util/util_ssef.h @@ -31,14 +31,14 @@ struct ssef typedef sseb Mask; // mask type typedef ssei Int; // int type typedef ssef Float; // float type - + enum { size = 4 }; // number of SIMD elements union { __m128 m128; float f[4]; int i[4]; }; // data //////////////////////////////////////////////////////////////////////////////// /// Constructors, Assignment & Cast Operators //////////////////////////////////////////////////////////////////////////////// - + __forceinline ssef () {} __forceinline ssef (const ssef& other) { m128 = other.m128; } __forceinline ssef& operator=(const ssef& other) { m128 = other.m128; return *this; } @@ -143,7 +143,7 @@ __forceinline ssef mini(const ssef& a, const ssef& b) { return _mm_castsi128_ps(ci); } #endif - + #if defined(__KERNEL_SSE41__) __forceinline ssef maxi(const ssef& a, const ssef& b) { const ssei ai = _mm_castps_si128(a); @@ -229,7 +229,7 @@ __forceinline const ssef select(const ssef& m, const ssef& t, const ssef& f) { #endif } -__forceinline const ssef select(const int mask, const ssef& t, const ssef& f) { +__forceinline const ssef select(const int mask, const ssef& t, const ssef& f) { #if defined(__KERNEL_SSE41__) && ((!defined(__clang__) && !defined(_MSC_VER)) || defined(__INTEL_COMPILER)) return _mm_blend_ps(f, t, mask); #else @@ -298,8 +298,8 @@ template<> __forceinline const ssef shuffle<2, 3, 2, 3>(const ssef& a, const sse } #if defined(__KERNEL_SSSE3__) -__forceinline const ssef shuffle8(const ssef& a, const ssei& shuf) { - return _mm_castsi128_ps(_mm_shuffle_epi8(_mm_castps_si128(a), shuf)); +__forceinline const ssef shuffle8(const ssef& a, const ssei& shuf) { + return _mm_castsi128_ps(_mm_shuffle_epi8(_mm_castps_si128(a), shuf)); } #endif @@ -333,7 +333,7 @@ template<size_t dst> __forceinline const ssef insert(const ssef& a, /// Transpose //////////////////////////////////////////////////////////////////////////////// -__forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, const ssef& r3, ssef& c0, ssef& c1, ssef& c2, ssef& c3) +__forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, const ssef& r3, ssef& c0, ssef& c1, ssef& c2, ssef& c3) { ssef l02 = unpacklo(r0,r2); ssef h02 = unpackhi(r0,r2); @@ -345,7 +345,7 @@ __forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, con c3 = unpackhi(h02,h13); } -__forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, const ssef& r3, ssef& c0, ssef& c1, ssef& c2) +__forceinline void transpose(const ssef& r0, const ssef& r1, const ssef& r2, const ssef& r3, ssef& c0, ssef& c1, ssef& c2) { ssef l02 = unpacklo(r0,r2); ssef h02 = unpackhi(r0,r2); @@ -382,22 +382,22 @@ __forceinline size_t movemask( const ssef& a ) { return _mm_movemask_ps(a); } __forceinline ssef load4f(const float4& a) { #ifdef __KERNEL_WITH_SSE_ALIGN__ - return _mm_load_ps(&a.x); + return _mm_load_ps(&a.x); #else - return _mm_loadu_ps(&a.x); + return _mm_loadu_ps(&a.x); #endif } __forceinline ssef load4f(const float3& a) { #ifdef __KERNEL_WITH_SSE_ALIGN__ - return _mm_load_ps(&a.x); + return _mm_load_ps(&a.x); #else - return _mm_loadu_ps(&a.x); + return _mm_loadu_ps(&a.x); #endif } __forceinline ssef load4f(const void* const a) { - return _mm_load_ps((float*)a); + return _mm_load_ps((float*)a); } __forceinline ssef load1f_first(const float a) { @@ -409,14 +409,14 @@ __forceinline void store4f(void* ptr, const ssef& v) { } __forceinline ssef loadu4f(const void* const a) { - return _mm_loadu_ps((float*)a); + return _mm_loadu_ps((float*)a); } __forceinline void storeu4f(void* ptr, const ssef& v) { _mm_storeu_ps((float*)ptr,v); } -__forceinline void store4f(const sseb& mask, void* ptr, const ssef& f) { +__forceinline void store4f(const sseb& mask, void* ptr, const ssef& f) { #if defined(__KERNEL_AVX__) _mm_maskstore_ps((float*)ptr,(__m128i)mask,f); #else @@ -428,7 +428,7 @@ __forceinline ssef load4f_nt(void* ptr) { #if defined(__KERNEL_SSE41__) return _mm_castsi128_ps(_mm_stream_load_si128((__m128i*)ptr)); #else - return _mm_load_ps((float*)ptr); + return _mm_load_ps((float*)ptr); #endif } @@ -449,7 +449,7 @@ __forceinline float dot(const ssef& a, const ssef& b) { } /* calculate shuffled cross product, useful when order of components does not matter */ -__forceinline ssef cross_zxy(const ssef& a, const ssef& b) +__forceinline ssef cross_zxy(const ssef& a, const ssef& b) { const ssef a0 = a; const ssef b0 = shuffle<1,2,0,3>(b); @@ -458,7 +458,7 @@ __forceinline ssef cross_zxy(const ssef& a, const ssef& b) return msub(a0,b0,a1*b1); } -__forceinline ssef cross(const ssef& a, const ssef& b) +__forceinline ssef cross(const ssef& a, const ssef& b) { return shuffle<1,2,0,3>(cross_zxy(a, b)); } @@ -628,4 +628,3 @@ ccl_device_inline void print_ssef(const char *label, const ssef &a) CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_ssei.h b/intern/cycles/util/util_ssei.h index ef2a9e68b7d..ba0389cd114 100644 --- a/intern/cycles/util/util_ssei.h +++ b/intern/cycles/util/util_ssei.h @@ -38,7 +38,7 @@ struct ssei //////////////////////////////////////////////////////////////////////////////// /// Constructors, Assignment & Cast Operators //////////////////////////////////////////////////////////////////////////////// - + __forceinline ssei ( ) {} __forceinline ssei ( const ssei& a ) { m128 = a.m128; } __forceinline ssei& operator=( const ssei& a ) { m128 = a.m128; return *this; } @@ -173,15 +173,15 @@ __forceinline const sseb operator <=( const ssei& a, const ssei& b ) { return !( __forceinline const sseb operator <=( const ssei& a, const int32_t& b ) { return a <= ssei(b); } __forceinline const sseb operator <=( const int32_t& a, const ssei& b ) { return ssei(a) <= b; } -__forceinline const ssei select( const sseb& m, const ssei& t, const ssei& f ) { +__forceinline const ssei select( const sseb& m, const ssei& t, const ssei& f ) { #ifdef __KERNEL_SSE41__ - return _mm_castps_si128(_mm_blendv_ps(_mm_castsi128_ps(f), _mm_castsi128_ps(t), m)); + return _mm_castps_si128(_mm_blendv_ps(_mm_castsi128_ps(f), _mm_castsi128_ps(t), m)); #else - return _mm_or_si128(_mm_and_si128(m, t), _mm_andnot_si128(m, f)); + return _mm_or_si128(_mm_and_si128(m, t), _mm_andnot_si128(m, f)); #endif } -__forceinline const ssei select( const int mask, const ssei& t, const ssei& f ) { +__forceinline const ssei select( const int mask, const ssei& t, const ssei& f ) { #if defined(__KERNEL_SSE41__) && ((!defined(__clang__) && !defined(_MSC_VER)) || defined(__INTEL_COMPILER)) return _mm_castps_si128(_mm_blend_ps(_mm_castsi128_ps(f), _mm_castsi128_ps(t), mask)); #else @@ -249,8 +249,8 @@ __forceinline int reduce_add(const ssei& v) { return v[0]+v[1]+v[2]+v[3]; } /// Memory load and store operations //////////////////////////////////////////////////////////////////////////////// -__forceinline ssei load4i( const void* const a ) { - return _mm_load_si128((__m128i*)a); +__forceinline ssei load4i( const void* const a ) { + return _mm_load_si128((__m128i*)a); } __forceinline void store4i(void* ptr, const ssei& v) { @@ -261,7 +261,7 @@ __forceinline void storeu4i(void* ptr, const ssei& v) { _mm_storeu_si128((__m128i*)ptr,v); } -__forceinline void store4i( const sseb& mask, void* ptr, const ssei& i ) { +__forceinline void store4i( const sseb& mask, void* ptr, const ssei& i ) { #if defined (__KERNEL_AVX__) _mm_maskstore_ps((float*)ptr,(__m128i)mask,_mm_castsi128_ps(i)); #else @@ -269,17 +269,17 @@ __forceinline void store4i( const sseb& mask, void* ptr, const ssei& i ) { #endif } -__forceinline ssei load4i_nt (void* ptr) { +__forceinline ssei load4i_nt (void* ptr) { #if defined(__KERNEL_SSE41__) - return _mm_stream_load_si128((__m128i*)ptr); + return _mm_stream_load_si128((__m128i*)ptr); #else - return _mm_load_si128((__m128i*)ptr); + return _mm_load_si128((__m128i*)ptr); #endif } -__forceinline void store4i_nt(void* ptr, const ssei& v) { +__forceinline void store4i_nt(void* ptr, const ssei& v) { #if defined(__KERNEL_SSE41__) - _mm_stream_ps((float*)ptr,_mm_castsi128_ps(v)); + _mm_stream_ps((float*)ptr,_mm_castsi128_ps(v)); #else _mm_store_si128((__m128i*)ptr,v); #endif @@ -300,4 +300,3 @@ ccl_device_inline void print_ssei(const char *label, const ssei &a) CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp index 94ad512982c..995f5d3df27 100644 --- a/intern/cycles/util/util_string.cpp +++ b/intern/cycles/util/util_string.cpp @@ -293,4 +293,3 @@ string string_human_readable_number(size_t num) } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h index e2c105db9c1..7dfa97335a9 100644 --- a/intern/cycles/util/util_string.h +++ b/intern/cycles/util/util_string.h @@ -73,4 +73,3 @@ string string_human_readable_number(size_t num); CCL_NAMESPACE_END #endif /* __UTIL_STRING_H__ */ - diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp index 5f5211228c5..8ae5b63b2f9 100644 --- a/intern/cycles/util/util_system.cpp +++ b/intern/cycles/util/util_system.cpp @@ -312,4 +312,3 @@ size_t system_physical_ram() } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_system.h b/intern/cycles/util/util_system.h index e55dd6dd136..42ad72356b9 100644 --- a/intern/cycles/util/util_system.h +++ b/intern/cycles/util/util_system.h @@ -47,4 +47,3 @@ size_t system_physical_ram(); CCL_NAMESPACE_END #endif /* __UTIL_SYSTEM_H__ */ - diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp index 9df1096de8a..2d21d6b5a18 100644 --- a/intern/cycles/util/util_task.cpp +++ b/intern/cycles/util/util_task.cpp @@ -122,7 +122,7 @@ void TaskPool::cancel() do_cancel = true; TaskScheduler::clear(this); - + { thread_scoped_lock num_lock(num_mutex); @@ -210,7 +210,7 @@ void TaskScheduler::init(int num_threads) int current_group_threads = 0; if(num_groups > 1) { process_groups.resize(num_groups); - num_process_groups = system_cpu_process_groups(num_groups, + num_process_groups = system_cpu_process_groups(num_groups, &process_groups[0]); if(num_process_groups == 1) { current_group_threads = system_cpu_group_thread_count(process_groups[0]); @@ -251,7 +251,7 @@ void TaskScheduler::init(int num_threads) } } } - + users++; } @@ -295,7 +295,7 @@ bool TaskScheduler::thread_wait_pop(Entry& entry) assert(do_exit); return false; } - + entry = queue.front(); queue.pop_front(); @@ -518,4 +518,3 @@ string TaskPool::Summary::full_report() const } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h index 3ebfb007e40..15f0d341be7 100644 --- a/intern/cycles/util/util_task.h +++ b/intern/cycles/util/util_task.h @@ -118,7 +118,7 @@ protected: }; /* Task Scheduler - * + * * Central scheduler that holds running threads ready to execute tasks. A singe * queue holds the task from all pools. */ @@ -207,4 +207,3 @@ protected: CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_thread.h b/intern/cycles/util/util_thread.h index 4d8f464359c..77b51d37ea0 100644 --- a/intern/cycles/util/util_thread.h +++ b/intern/cycles/util/util_thread.h @@ -155,4 +155,3 @@ protected: CCL_NAMESPACE_END #endif /* __UTIL_THREAD_H__ */ - diff --git a/intern/cycles/util/util_time.cpp b/intern/cycles/util/util_time.cpp index 7c39aa294bf..bc6ac4e2099 100644 --- a/intern/cycles/util/util_time.cpp +++ b/intern/cycles/util/util_time.cpp @@ -77,4 +77,3 @@ void time_sleep(double t) CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_time.h b/intern/cycles/util/util_time.h index f03aa590e9b..13281bf188b 100644 --- a/intern/cycles/util/util_time.h +++ b/intern/cycles/util/util_time.h @@ -59,4 +59,3 @@ protected: CCL_NAMESPACE_END #endif - diff --git a/intern/cycles/util/util_transform.cpp b/intern/cycles/util/util_transform.cpp index 206c3da23eb..c72e729a2e5 100644 --- a/intern/cycles/util/util_transform.cpp +++ b/intern/cycles/util/util_transform.cpp @@ -16,10 +16,10 @@ /* * Adapted from code with license: - * + * * Copyright (c) 2002, Industrial Light & Magic, a division of Lucas * Digital Ltd. LLC. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -31,8 +31,8 @@ * distribution. * * Neither the name of Industrial Light & Magic nor the names of its * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * + * from this software without specific prior written permission. + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -236,7 +236,7 @@ static void transform_decompose(DecomposedTransform *decomp, const Transform *tf for(int i = 0; i < 3; i++) for(int j = 0; j < 4; j++) Rnext[i][j] = 0.5f * (R[i][j] + Rit[i][j]); - + norm = 0.0f; for(int i = 0; i < 3; i++) { norm = max(norm, diff --git a/intern/cycles/util/util_transform.h b/intern/cycles/util/util_transform.h index 987f4dac777..e781f85dded 100644 --- a/intern/cycles/util/util_transform.h +++ b/intern/cycles/util/util_transform.h @@ -258,7 +258,7 @@ ccl_device_inline bool transform_uniform_scale(const Transform& tfm, float& scal /* the epsilon here is quite arbitrary, but this function is only used for * surface area and bump, where we expect it to not be so sensitive */ float eps = 1e-6f; - + float sx = len_squared(float4_to_float3(tfm.x)); float sy = len_squared(float4_to_float3(tfm.y)); float sz = len_squared(float4_to_float3(tfm.z)); @@ -471,4 +471,3 @@ OPENCL_TRANSFORM_ADDRSPACE_DECLARE(transform_direction_transposed) CCL_NAMESPACE_END #endif /* __UTIL_TRANSFORM_H__ */ - diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h index 4bbba649ff2..dfe755a8789 100644 --- a/intern/cycles/util/util_types.h +++ b/intern/cycles/util/util_types.h @@ -152,4 +152,3 @@ CCL_NAMESPACE_END #endif #endif /* __UTIL_TYPES_H__ */ - diff --git a/intern/cycles/util/util_types_float4_impl.h b/intern/cycles/util/util_types_float4_impl.h index 09f45f47d38..a49fac65b10 100644 --- a/intern/cycles/util/util_types_float4_impl.h +++ b/intern/cycles/util/util_types_float4_impl.h @@ -102,7 +102,7 @@ ccl_device_inline float4 make_float4(const int4& i) ccl_device_inline void print_float4(const char *label, const float4& a) { printf("%s: %.8f %.8f %.8f %.8f\n", - label, + label, (double)a.x, (double)a.y, (double)a.z, (double)a.w); } #endif /* __KERNEL_GPU__ */ diff --git a/intern/cycles/util/util_vector.h b/intern/cycles/util/util_vector.h index 8d91d3936a4..569f503b66e 100644 --- a/intern/cycles/util/util_vector.h +++ b/intern/cycles/util/util_vector.h @@ -341,4 +341,3 @@ protected: CCL_NAMESPACE_END #endif /* __UTIL_VECTOR_H__ */ - diff --git a/intern/cycles/util/util_view.cpp b/intern/cycles/util/util_view.cpp index 7b453d123b8..05094c7b327 100644 --- a/intern/cycles/util/util_view.cpp +++ b/intern/cycles/util/util_view.cpp @@ -272,4 +272,3 @@ void view_redraw() } CCL_NAMESPACE_END - diff --git a/intern/cycles/util/util_view.h b/intern/cycles/util/util_view.h index 5def0564175..e603e605776 100644 --- a/intern/cycles/util/util_view.h +++ b/intern/cycles/util/util_view.h @@ -41,4 +41,3 @@ void view_redraw(); CCL_NAMESPACE_END #endif /*__UTIL_VIEW_H__*/ - diff --git a/intern/cycles/util/util_windows.h b/intern/cycles/util/util_windows.h index 7ea3e65c2c5..3b23ce8a3cb 100644 --- a/intern/cycles/util/util_windows.h +++ b/intern/cycles/util/util_windows.h @@ -57,4 +57,3 @@ CCL_NAMESPACE_END #endif /* WIN32 */ #endif /* __UTIL_WINDOWS_H__ */ - |