Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-03-16 11:30:35 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-03-16 11:31:27 +0300
commit60df4d10ffb6409e9c386951e5813b0dc37d4781 (patch)
tree664d1496c2897d207c67920a2003f7d477a093e3 /intern
parentce009c80197e7d9b1466f8d15534c44a4b2a7608 (diff)
Fix T43999: MIS for environment broken after multi-threading commit
Typo in task start row calculation.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/render/light.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 56bec4053d5..b6c7b379a7e 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();
}