Cycles: Assert in the cases when SVM node was not handled
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 1 Jun 2015 13:21:29 +0000 (18:21 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 1 Jun 2015 14:49:52 +0000 (19:49 +0500)
This will help figuring out cases when node was not properly handled by the SVM
by aborting execution on CPU, where all the nodes are expected to be supported.

intern/cycles/kernel/svm/svm.h

index 42a581cbd9a96f298c1a6706fb33ace098f7f3af..15ac65197806bb9761c3f1a35973b3ad543078ac 100644 (file)
@@ -448,7 +448,9 @@ ccl_device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, Shade
 #  endif  /* __EXTRA_NODES__ */
 #endif  /* NODES_GROUP(NODE_GROUP_LEVEL_3) */
                        case NODE_END:
+                               return;
                        default:
+                               kernel_assert(!"Unknown node type was passed to the SVM machine");
                                return;
                }
        }