Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 2 May 2017 13:40:23 +0000 (15:40 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 2 May 2017 13:41:15 +0000 (15:41 +0200)
intern/cycles/kernel/kernel_image_opencl.h
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc

index 795f2e3149f9bd722c7c9427fb3a1c95f36597d4..90747e0935734674ae7273034a9b9cf366f4876e 100644 (file)
@@ -20,7 +20,7 @@
 
 ccl_device_inline float4 svm_image_texture_read(KernelGlobals *kg, int id, int offset)
 {
-       const texture_type = kernel_tex_type(id);
+       const int texture_type = kernel_tex_type(id);
        /* Float4 */
        if(texture_type == IMAGE_DATA_TYPE_FLOAT4) {
                return kernel_tex_fetch(__tex_image_float4_packed, offset);
index db575c0da7c79a96b4007565e99e2e1bc8148e9d..b87bbb60479543a8d673e4f9bf477c8e3219e2e3 100644 (file)
@@ -839,18 +839,11 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
        }
 
        /* materials */
-       if (ob->totcol != 0) {
-               for (int a = 1; a <= ob->totcol; a++) {
-                       Material *ma = give_current_material(ob, a);
-                       if (ma != NULL) {
-                               build_material(ma);
-                       }
+       for (int a = 1; a <= ob->totcol; a++) {
+               Material *ma = give_current_material(ob, a);
+               if (ma != NULL) {
+                       build_material(ma);
                }
-               add_operation_node(&ob->id,
-                                  DEPSNODE_TYPE_SHADING,
-                                  DEPSOP_TYPE_EXEC,
-                                  NULL,
-                                  DEG_OPCODE_PLACEHOLDER, "Material Update");
        }
 
        /* geometry collision */
index ae12d00e035227792d0f92f8966ab8dcf9255f0b..27a24031911401ed3b43ec5510b3760adc90dc9d 100644 (file)
@@ -1489,28 +1489,13 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
        }
 
        /* materials */
-       if (ob->totcol != 0) {
-               ComponentKey object_shading_key(&ob->id, DEPSNODE_TYPE_SHADING);
+       if (ob->totcol) {
                for (int a = 1; a <= ob->totcol; a++) {
                        Material *ma = give_current_material(ob, a);
                        if (ma != NULL) {
                                build_material(ma);
-                               ComponentKey material_shading_key(&ma->id,
-                                                                 DEPSNODE_TYPE_SHADING);
-                               add_relation(material_shading_key,
-                                            object_shading_key,
-                                            DEPSREL_TYPE_UPDATE,
-                                            "Object Shading");
                        }
                }
-               OperationKey obdata_geom_done_key(obdata,
-                                                 DEPSNODE_TYPE_GEOMETRY,
-                                                 DEG_OPCODE_PLACEHOLDER,
-                                                 "Eval Done");
-               add_relation(geom_key,
-                            object_shading_key,
-                            DEPSREL_TYPE_UPDATE,
-                            "Object Shading");
        }
 
        /* geometry collision */