[Bf-blender-cvs] [85ad248c36c] master: Code cleanup: fix warning and improve terminology.

Brecht Van Lommel noreply at git.blender.org
Sat Aug 12 14:10:49 CEST 2017


Commit: 85ad248c36cf15cc28b8a10b60e057ca4cf0e798
Author: Brecht Van Lommel
Date:   Fri Aug 11 14:21:34 2017 +0200
Branches: master
https://developer.blender.org/rB85ad248c36cf15cc28b8a10b60e057ca4cf0e798

Code cleanup: fix warning and improve terminology.

===================================================================

M	intern/cycles/device/opencl/opencl.h
M	intern/cycles/kernel/kernel_path.h
M	intern/cycles/kernel/kernel_path_branched.h
M	intern/cycles/kernel/kernel_path_state.h
M	intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h

===================================================================

diff --git a/intern/cycles/device/opencl/opencl.h b/intern/cycles/device/opencl/opencl.h
index 71483ca9159..26bf4a9af5b 100644
--- a/intern/cycles/device/opencl/opencl.h
+++ b/intern/cycles/device/opencl/opencl.h
@@ -543,7 +543,7 @@ protected:
 
 private:
 	MemoryManager memory_manager;
-	friend MemoryManager;
+	friend class MemoryManager;
 
 	struct tex_info_t {
 		uint buffer, padding;
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 92b31d46697..2a801597649 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -356,7 +356,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
 		 * mainly due to the mixed in MIS that we use. gives too many unneeded
 		 * shader evaluations, only need emission if we are going to terminate */
 		float probability =
-		        path_state_terminate_probability(kg,
+		        path_state_continuation_probability(kg,
 		                                         state,
 		                                         throughput*num_samples);
 
@@ -717,7 +717,7 @@ ccl_device_inline float kernel_path_integrate(KernelGlobals *kg,
 		/* path termination. this is a strange place to put the termination, it's
 		 * mainly due to the mixed in MIS that we use. gives too many unneeded
 		 * shader evaluations, only need emission if we are going to terminate */
-		float probability = path_state_terminate_probability(kg, &state, throughput);
+		float probability = path_state_continuation_probability(kg, &state, throughput);
 
 		if(probability == 0.0f) {
 			break;
diff --git a/intern/cycles/kernel/kernel_path_branched.h b/intern/cycles/kernel/kernel_path_branched.h
index cea677fd701..17facfa9a78 100644
--- a/intern/cycles/kernel/kernel_path_branched.h
+++ b/intern/cycles/kernel/kernel_path_branched.h
@@ -558,7 +558,7 @@ ccl_device float kernel_branched_path_integrate(KernelGlobals *kg,
 			/* path termination. this is a strange place to put the termination, it's
 			 * mainly due to the mixed in MIS that we use. gives too many unneeded
 			 * shader evaluations, only need emission if we are going to terminate */
-			float probability = path_state_terminate_probability(kg, &state, throughput);
+			float probability = path_state_continuation_probability(kg, &state, throughput);
 
 			if(probability == 0.0f) {
 				break;
diff --git a/intern/cycles/kernel/kernel_path_state.h b/intern/cycles/kernel/kernel_path_state.h
index 0102de183f3..28582de979d 100644
--- a/intern/cycles/kernel/kernel_path_state.h
+++ b/intern/cycles/kernel/kernel_path_state.h
@@ -156,7 +156,7 @@ ccl_device_inline uint path_state_ray_visibility(KernelGlobals *kg, PathState *s
 	return flag;
 }
 
-ccl_device_inline float path_state_terminate_probability(KernelGlobals *kg, ccl_addr_space PathState *state, const float3 throughput)
+ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg, ccl_addr_space PathState *state, const float3 throughput)
 {
 	if(state->flag & PATH_RAY_TRANSPARENT) {
 		/* Transparent rays are treated separately with own max bounces. */
diff --git a/intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h b/intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h
index fe761305bfb..adcb1bdc377 100644
--- a/intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h
+++ b/intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h
@@ -224,19 +224,19 @@ ccl_device void kernel_holdout_emission_blurring_pathtermination_ao(
 		 * shader evaluations, only need emission if we are going to terminate.
 		 */
 #ifndef __BRANCHED_PATH__
-		float probability = path_state_terminate_probability(kg, state, throughput);
+		float probability = path_state_continuation_probability(kg, state, throughput);
 #else
 		float probability = 1.0f;
 
 		if(!kernel_data.integrator.branched) {
-			probability = path_state_terminate_probability(kg, state, throughput);
+			probability = path_state_continuation_probability(kg, state, throughput);
 		}
 		else if(IS_FLAG(ray_state, ray_index, RAY_BRANCHED_INDIRECT)) {
 			int num_samples = kernel_split_state.branched_state[ray_index].num_samples;
-			probability = path_state_terminate_probability(kg, state, throughput*num_samples);
+			probability = path_state_continuation_probability(kg, state, throughput*num_samples);
 		}
 		else if(state->flag & PATH_RAY_TRANSPARENT) {
-			probability = path_state_terminate_probability(kg, state, throughput);
+			probability = path_state_continuation_probability(kg, state, throughput);
 		}
 #endif




More information about the Bf-blender-cvs mailing list