Merge branch 'master' into blender2.8
[blender.git] / source / blender / nodes / shader / nodes / node_shader_math.c
index 605c869099a6665d31a5669c43560c7b7efe250c..1b702a722ba6293278d77b2277a46c96cf45c5b3 100644 (file)
@@ -296,7 +296,7 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(
                case NODE_MATH_GREATER:
                case NODE_MATH_MOD:
                case NODE_MATH_ATAN2:
                case NODE_MATH_GREATER:
                case NODE_MATH_MOD:
                case NODE_MATH_ATAN2:
-                       GPU_stack_link(mat, names[node->custom1], in, out);
+                       GPU_stack_link(mat, node, names[node->custom1], in, out);
                        break;
                case NODE_MATH_SIN:
                case NODE_MATH_COS:
                        break;
                case NODE_MATH_SIN:
                case NODE_MATH_COS:
@@ -315,14 +315,14 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(
                                GPUNodeStack tmp_in[2];
                                memcpy(&tmp_in[0], &in[0], sizeof(GPUNodeStack));
                                memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack));
                                GPUNodeStack tmp_in[2];
                                memcpy(&tmp_in[0], &in[0], sizeof(GPUNodeStack));
                                memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack));
-                               GPU_stack_link(mat, names[node->custom1], tmp_in, out);
+                               GPU_stack_link(mat, node, names[node->custom1], tmp_in, out);
                        }
                        else {
                                /* use only second item and terminator */
                                GPUNodeStack tmp_in[2];
                                memcpy(&tmp_in[0], &in[1], sizeof(GPUNodeStack));
                                memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack));
                        }
                        else {
                                /* use only second item and terminator */
                                GPUNodeStack tmp_in[2];
                                memcpy(&tmp_in[0], &in[1], sizeof(GPUNodeStack));
                                memcpy(&tmp_in[1], &in[2], sizeof(GPUNodeStack));
-                               GPU_stack_link(mat, names[node->custom1], tmp_in, out);
+                               GPU_stack_link(mat, node, names[node->custom1], tmp_in, out);
                        }
                        break;
                default:
                        }
                        break;
                default:
@@ -343,7 +343,6 @@ void register_node_type_sh_math(void)
        static bNodeType ntype;
 
        sh_node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, 0);
        static bNodeType ntype;
 
        sh_node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, 0);
-       node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_math_in, sh_node_math_out);
        node_type_label(&ntype, node_math_label);
        node_type_storage(&ntype, "", NULL, NULL);
        node_type_socket_templates(&ntype, sh_node_math_in, sh_node_math_out);
        node_type_label(&ntype, node_math_label);
        node_type_storage(&ntype, "", NULL, NULL);