diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:17:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:17:58 +0300 |
commit | 1daa20ad9f6f0c433a4e0a97a74e5beb9ea4e2c7 (patch) | |
tree | 982857c47d650cb3f53df065cdcbcca827bff56d /intern/cycles/render/svm.cpp | |
parent | 62fbb7d4a10bea1ce88a486657a87743b93c9fd1 (diff) |
Cleanup: strip trailing space for cycles
Diffstat (limited to 'intern/cycles/render/svm.cpp')
-rw-r--r-- | intern/cycles/render/svm.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
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 - |