[Bf-blender-cvs] [60df4d1] master: Fix T43999: MIS for environment broken after multi-threading commit

Sergey Sharybin noreply at git.blender.org
Mon Mar 16 09:47:26 CET 2015


Commit: 60df4d10ffb6409e9c386951e5813b0dc37d4781
Author: Sergey Sharybin
Date:   Mon Mar 16 13:30:35 2015 +0500
Branches: master
https://developer.blender.org/rB60df4d10ffb6409e9c386951e5813b0dc37d4781

Fix T43999: MIS for environment broken after multi-threading commit

Typo in task start row calculation.

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

M	intern/cycles/render/light.cpp

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

diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 56bec40..b6c7b37 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -466,17 +466,19 @@ void LightManager::device_update_background(Device *device, DeviceScene *dscene,
 		/* Threaded evaluation for large resolution. */
 		const int num_blocks = TaskScheduler::num_threads();
 		const int chunk_size = res / num_blocks;
+		int start_row = 0;
 		TaskPool pool;
 		for(int i = 0; i < num_blocks; ++i) {
 			const int current_chunk_size =
-				(i != num_blocks - 1) ? chunk_size
+			    (i != num_blocks - 1) ? chunk_size
 			                          : (res - i * chunk_size);
 			pool.push(function_bind(&background_cdf,
-			                        i, i + current_chunk_size,
+			                        start_row, start_row + current_chunk_size,
 			                        res,
 			                        cdf_count,
 			                        &pixels,
 			                        cond_cdf));
+			start_row += current_chunk_size;
 		}
 		pool.wait_work();
 	}




More information about the Bf-blender-cvs mailing list