diff options
Diffstat (limited to 'src/tests/gpu/test_sequence.cc')
| -rw-r--r-- | src/tests/gpu/test_sequence.cc | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/tests/gpu/test_sequence.cc b/src/tests/gpu/test_sequence.cc index 337381a..8e27efb 100644 --- a/src/tests/gpu/test_sequence.cc +++ b/src/tests/gpu/test_sequence.cc @@ -1,8 +1,8 @@ // Test file for Sequence v2 system // Phase 1: Foundation tests (NodeRegistry, Sequence base class) -#include "gpu/sequence.h" #include "gpu/effect.h" +#include "gpu/sequence.h" #include "tests/common/webgpu_test_fixture.h" #include <cassert> #include <cstdio> @@ -11,8 +11,10 @@ class TestEffect : public Effect { public: TestEffect(const GpuContext& ctx, const std::vector<std::string>& inputs, - const std::vector<std::string>& outputs) - : Effect(ctx, inputs, outputs), render_called_(false) { + const std::vector<std::string>& outputs, float start_time = 0.0f, + float end_time = 1000.0f) + : Effect(ctx, inputs, outputs, start_time, end_time), + render_called_(false) { } void render(WGPUCommandEncoder encoder, const UniformsSequenceParams& params, @@ -132,16 +134,15 @@ void test_sequence_v2_dag_execution() { class TestSequence : public Sequence { public: TestSequence(const GpuContext& ctx) - : Sequence(ctx, 1280, 720), - effect1_(std::make_shared<TestEffect>(ctx, std::vector<std::string>{"source"}, - std::vector<std::string>{"temp"})), - effect2_(std::make_shared<TestEffect>(ctx, std::vector<std::string>{"temp"}, - std::vector<std::string>{"sink"})) { + : Sequence(ctx, 1280, 720), effect1_(std::make_shared<TestEffect>( + ctx, std::vector<std::string>{"source"}, + std::vector<std::string>{"temp"})), + effect2_(std::make_shared<TestEffect>( + ctx, std::vector<std::string>{"temp"}, + std::vector<std::string>{"sink"})) { // Build DAG (2 effects in sequence) - effect_dag_.push_back( - {effect1_, {"source"}, {"temp"}, 0}); - effect_dag_.push_back( - {effect2_, {"temp"}, {"sink"}, 1}); + effect_dag_.push_back({effect1_, {"source"}, {"temp"}, 0}); + effect_dag_.push_back({effect2_, {"temp"}, {"sink"}, 1}); } std::shared_ptr<TestEffect> effect1_; |
