Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/test/render_graph_finalize_test.cpp
| Show First 20 Lines • Show All 997 Lines • ▼ Show 20 Lines | TEST_F(RenderGraph, constant_fold_math_clamp) | ||||
| graph.finalize(scene); | graph.finalize(scene); | ||||
| } | } | ||||
| /* | /* | ||||
| * Graph for testing partial folds of Math with one constant argument. | * Graph for testing partial folds of Math with one constant argument. | ||||
| * Includes 2 tests: constant on each side. | * Includes 2 tests: constant on each side. | ||||
| */ | */ | ||||
| static void build_math_partial_test_graph(ShaderGraphBuilder &builder, | static void build_math_partial_test_graph(ShaderGraphBuilder &builder, | ||||
| NodeMath type, | NodeMathType type, | ||||
| float constval) | float constval) | ||||
| { | { | ||||
| builder | builder | ||||
| .add_attribute("Attribute") | .add_attribute("Attribute") | ||||
| /* constant on the left */ | /* constant on the left */ | ||||
| .add_node(ShaderNodeBuilder<MathNode>("Math_Cx") | .add_node(ShaderNodeBuilder<MathNode>("Math_Cx") | ||||
| .set(&MathNode::type, type) | .set(&MathNode::type, type) | ||||
| .set(&MathNode::use_clamp, false) | .set(&MathNode::use_clamp, false) | ||||
| ▲ Show 20 Lines • Show All 533 Lines • Show Last 20 Lines | |||||