Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 10 Apr 2017 15:34:31 +0000 (17:34 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 10 Apr 2017 15:34:31 +0000 (17:34 +0200)
Conflicts:
source/blender/editors/space_view3d/drawobject.c

intern/cycles/render/shader.cpp
intern/cycles/render/shader.h
intern/cycles/render/svm.cpp
intern/cycles/render/svm.h
source/blender/editors/space_view3d/drawobject.c

index 12d3c6cf83299777134dbdd4a090f907b2a2de07..23eee1916bd95951acec7d9581d0edfcd8fdf6dd 100644 (file)
@@ -332,6 +332,8 @@ ShaderManager *ShaderManager::create(Scene *scene, int shadingsystem)
 
 uint ShaderManager::get_attribute_id(ustring name)
 {
+       thread_scoped_spin_lock lock(attribute_lock_);
+
        /* get a unique id for each name, for SVM attribute lookup */
        AttributeIDMap::iterator it = unique_attribute_id.find(name);
 
index 87fef19c59216aee7e1ee68fabd1a02b53a95c1f..a8018231f1a3bb2dc37e08bdd48cbd8b0ae3d34c 100644 (file)
@@ -202,6 +202,8 @@ protected:
 
        void get_requested_graph_features(ShaderGraph *graph,
                                          DeviceRequestedFeatures *requested_features);
+
+       thread_spin_lock attribute_lock_;
 };
 
 CCL_NAMESPACE_END
index 9cf3f4cb0b2e491735b17fb33ee98857fb3b9611..48287d872d4fa94b25a9b8371b71e9ddfbd28993 100644 (file)
@@ -393,13 +393,11 @@ void SVMCompiler::add_node(const float4& f)
 
 uint SVMCompiler::attribute(ustring name)
 {
-       thread_scoped_spin_lock lock(attribute_lock_);
        return shader_manager->get_attribute_id(name);
 }
 
 uint SVMCompiler::attribute(AttributeStandard std)
 {
-       thread_scoped_spin_lock lock(attribute_lock_);
        return shader_manager->get_attribute_id(std);
 }
 
index eef344a506e4cc527fdbee7c1a9a49f8c0517acc..abbd9e50610419b92d159e96bf11fcb875a976c2 100644 (file)
@@ -218,8 +218,6 @@ protected:
        int max_stack_use;
        uint mix_weight_offset;
        bool compile_failed;
-
-       thread_spin_lock attribute_lock_;
 };
 
 CCL_NAMESPACE_END
index c9f697b1cc1354e09d2981263f394e12d7910efa..f4498b1592ef927808730a3c3d6f1bc9cf57f251 100644 (file)
@@ -1907,14 +1907,14 @@ static void drawcamera_volume(float near_plane[4][3], float far_plane[4][3], boo
                immVertex3fv(pos, near_plane[2]);
 
                immVertex3fv(pos, near_plane[2]);
-               immVertex3fv(pos, near_plane[1]);
-               immVertex3fv(pos, far_plane[1]);
                immVertex3fv(pos, far_plane[2]);
-
-               immVertex3fv(pos, far_plane[0]);
-               immVertex3fv(pos, near_plane[0]);
+               immVertex3fv(pos, far_plane[3]);
                immVertex3fv(pos, near_plane[3]);
+
                immVertex3fv(pos, far_plane[3]);
+               immVertex3fv(pos, near_plane[3]);
+               immVertex3fv(pos, near_plane[0]);
+               immVertex3fv(pos, far_plane[0]);
                immEnd();
 #endif
        }