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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-01-25 06:00:57 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-01-25 06:00:57 +0400
commit38c94e919457eacdaedf641bb4afdd68af288b21 (patch)
treea67a5a5df6698a3ef6aba444741cd616b3df9859 /intern/cycles
parentc411cde415ee7dc8a208e932d5ba1a240c4e669e (diff)
Fix cycles crash that happened with mesh emission and diffuse/glossy ray
visibility disabled on some objects.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/blender/blender_curves.cpp2
-rw-r--r--intern/cycles/render/light.cpp4
-rw-r--r--intern/cycles/util/util_task.cpp7
-rw-r--r--intern/cycles/util/util_task.h1
4 files changed, 4 insertions, 10 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index e1cc35a5322..cf2c018f1a2 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -1046,8 +1046,6 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
if(mesh->need_attribute(scene, name) || mesh->need_attribute(scene, std)) {
Attribute *attr;
- Attribute *attr_uv = NULL, *attr_intercept = NULL;
-
if(active_render)
attr = mesh->curve_attributes.add(std, name);
else
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 1b94d603a26..04fea1953e7 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -198,8 +198,10 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
bool have_emission = false;
/* skip if we are not visible for BSDFs */
- if(!(object->visibility & (PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY|PATH_RAY_TRANSMIT)))
+ if(!(object->visibility & (PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY|PATH_RAY_TRANSMIT))) {
+ j++;
continue;
+ }
/* skip if we have no emission shaders */
foreach(uint sindex, mesh->used_shaders) {
diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp
index 8c4ec312256..43f15ba0ce6 100644
--- a/intern/cycles/util/util_task.cpp
+++ b/intern/cycles/util/util_task.cpp
@@ -152,7 +152,6 @@ void TaskPool::num_increase()
thread_mutex TaskScheduler::mutex;
int TaskScheduler::users = 0;
vector<thread*> TaskScheduler::threads;
-vector<int> TaskScheduler::thread_level;
volatile bool TaskScheduler::do_exit = false;
list<TaskScheduler::Entry> TaskScheduler::queue;
@@ -179,12 +178,9 @@ void TaskScheduler::init(int num_threads)
/* launch threads that will be waiting for work */
threads.resize(num_threads);
- thread_level.resize(num_threads);
- for(size_t i = 0; i < threads.size(); i++) {
+ for(size_t i = 0; i < threads.size(); i++)
threads[i] = new thread(function_bind(&TaskScheduler::thread_run, i));
- thread_level[i] = 0;
- }
}
users++;
@@ -208,7 +204,6 @@ void TaskScheduler::exit()
}
threads.clear();
- thread_level.clear();
}
}
diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h
index b795ca7524b..5bca3f255af 100644
--- a/intern/cycles/util/util_task.h
+++ b/intern/cycles/util/util_task.h
@@ -111,7 +111,6 @@ protected:
static thread_mutex mutex;
static int users;
static vector<thread*> threads;
- static vector<int> thread_level;
static volatile bool do_exit;
static list<Entry> queue;