summaryrefslogtreecommitdiff
path: root/src/tests/gpu/test_effect_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/gpu/test_effect_base.cc')
-rw-r--r--src/tests/gpu/test_effect_base.cc33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/tests/gpu/test_effect_base.cc b/src/tests/gpu/test_effect_base.cc
index ad7bca3..57d0504 100644
--- a/src/tests/gpu/test_effect_base.cc
+++ b/src/tests/gpu/test_effect_base.cc
@@ -214,12 +214,15 @@ class WireDagTestEffect : public Effect {
public:
WireDagTestEffect(const GpuContext& ctx, std::vector<std::string> ins,
std::vector<std::string> outs)
- : Effect(ctx, std::move(ins), std::move(outs), 0.0f, 1000.0f) {}
+ : Effect(ctx, std::move(ins), std::move(outs), 0.0f, 1000.0f) {
+ }
void render(WGPUCommandEncoder, const UniformsSequenceParams&,
- NodeRegistry&) override {}
+ NodeRegistry&) override {
+ }
- std::string call_find_downstream(const std::vector<EffectDAGNode>& dag) const {
+ std::string
+ call_find_downstream(const std::vector<EffectDAGNode>& dag) const {
return find_downstream_output(dag);
}
@@ -239,12 +242,12 @@ static void test_find_downstream_output() {
return;
}
- auto a = std::make_shared<WireDagTestEffect>(
- fixture.ctx(), std::vector<std::string>{"src"},
- std::vector<std::string>{"mid"});
- auto b = std::make_shared<WireDagTestEffect>(
- fixture.ctx(), std::vector<std::string>{"mid"},
- std::vector<std::string>{"out"});
+ auto a = std::make_shared<WireDagTestEffect>(fixture.ctx(),
+ std::vector<std::string>{"src"},
+ std::vector<std::string>{"mid"});
+ auto b = std::make_shared<WireDagTestEffect>(fixture.ctx(),
+ std::vector<std::string>{"mid"},
+ std::vector<std::string>{"out"});
auto c = std::make_shared<WireDagTestEffect>(
fixture.ctx(), std::vector<std::string>{"out"},
std::vector<std::string>{"final"});
@@ -304,7 +307,8 @@ static void test_find_downstream_output() {
a->wire_dag(dag_to_sink);
assert(a->wired_to == "sink" &&
"base helper returns sink — caller must guard");
- fprintf(stdout, " ✓ sink downstream: find returns 'sink', caller must guard\n");
+ fprintf(stdout,
+ " ✓ sink downstream: find returns 'sink', caller must guard\n");
}
// Test 8: wire_dag called automatically by init_effect_nodes
@@ -326,13 +330,12 @@ static void test_wire_dag_called_by_sequence() {
class TestSequence : public Sequence {
public:
- TestSequence(const GpuContext& ctx,
- std::shared_ptr<Effect> up,
+ TestSequence(const GpuContext& ctx, std::shared_ptr<Effect> up,
std::shared_ptr<Effect> down)
: Sequence(ctx, 256, 256) {
- effect_dag_.push_back({up, {"source"}, {"mid"}, 0});
- effect_dag_.push_back({down, {"mid"}, {"sink"}, 1});
- init_effect_nodes(); // triggers wire_dag on both effects
+ effect_dag_.push_back({up, {"source"}, {"mid"}, 0});
+ effect_dag_.push_back({down, {"mid"}, {"sink"}, 1});
+ init_effect_nodes(); // triggers wire_dag on both effects
}
};