diff options
Diffstat (limited to 'src/tests/gpu')
| -rw-r--r-- | src/tests/gpu/test_demo_effects.cc | 18 | ||||
| -rw-r--r-- | src/tests/gpu/test_effect_base.cc | 8 | ||||
| -rw-r--r-- | src/tests/gpu/test_sequence.cc | 6 | ||||
| -rw-r--r-- | src/tests/gpu/test_sequence_e2e.cc | 4 |
4 files changed, 20 insertions, 16 deletions
diff --git a/src/tests/gpu/test_demo_effects.cc b/src/tests/gpu/test_demo_effects.cc index 7f9d3da..f193c76 100644 --- a/src/tests/gpu/test_demo_effects.cc +++ b/src/tests/gpu/test_demo_effects.cc @@ -39,31 +39,31 @@ static void test_effects() { std::vector<std::pair<const char*, std::shared_ptr<Effect>>> effects = { {"Passthrough", std::make_shared<Passthrough>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, {"GaussianBlur", std::make_shared<GaussianBlur>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, {"Placeholder", std::make_shared<Placeholder>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, {"Heptagon", std::make_shared<Heptagon>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, {"Particles", std::make_shared<Particles>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, {"RotatingCube", std::make_shared<RotatingCube>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, {"Hybrid3D", std::make_shared<Hybrid3D>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, {"Flash", std::make_shared<Flash>(fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, {"PeakMeter", std::make_shared<PeakMeter>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"})}, + std::vector<std::string>{"sink"}, 0.0f, 1000.0f)}, }; int passed = 0; diff --git a/src/tests/gpu/test_effect_base.cc b/src/tests/gpu/test_effect_base.cc index f46a4ef..29d3348 100644 --- a/src/tests/gpu/test_effect_base.cc +++ b/src/tests/gpu/test_effect_base.cc @@ -83,7 +83,7 @@ static void test_effect_construction() { // Create Passthrough (simple effect) auto effect = std::make_shared<Passthrough>( fixture.ctx(), std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"}); + std::vector<std::string>{"sink"}, 0.0f, 1000.0f); assert(effect != nullptr && "Effect should be constructed"); @@ -106,7 +106,8 @@ static void test_effect_in_sequence() { TestSequence(const GpuContext& ctx, int w, int h) : Sequence(ctx, w, h) { auto effect = std::make_shared<Passthrough>(ctx, std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"}); + std::vector<std::string>{"sink"}, 0.0f, + 1000.0f); effect_dag_.push_back({effect, {"source"}, {"sink"}, 0}); init_effect_nodes(); @@ -138,7 +139,8 @@ static void test_sequence_render() { TestSequence(const GpuContext& ctx, int w, int h) : Sequence(ctx, w, h) { auto effect = std::make_shared<Passthrough>(ctx, std::vector<std::string>{"source"}, - std::vector<std::string>{"sink"}); + std::vector<std::string>{"sink"}, 0.0f, + 1000.0f); effect_dag_.push_back({effect, {"source"}, {"sink"}, 0}); init_effect_nodes(); diff --git a/src/tests/gpu/test_sequence.cc b/src/tests/gpu/test_sequence.cc index fa6bd5e..8e27efb 100644 --- a/src/tests/gpu/test_sequence.cc +++ b/src/tests/gpu/test_sequence.cc @@ -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, diff --git a/src/tests/gpu/test_sequence_e2e.cc b/src/tests/gpu/test_sequence_e2e.cc index ed8920a..5d59e0d 100644 --- a/src/tests/gpu/test_sequence_e2e.cc +++ b/src/tests/gpu/test_sequence_e2e.cc @@ -23,13 +23,13 @@ class SimpleTestSequence : public Sequence { // Effect DAG construction (2 effects: source->temp->sink) effect_dag_.push_back({.effect = std::make_shared<Passthrough>( ctx, std::vector<std::string>{"source"}, - std::vector<std::string>{"temp"}), + std::vector<std::string>{"temp"}, 0.0f, 1000.0f), .input_nodes = {"source"}, .output_nodes = {"temp"}, .execution_order = 0}); effect_dag_.push_back({.effect = std::make_shared<Passthrough>( ctx, std::vector<std::string>{"temp"}, - std::vector<std::string>{"sink"}), + std::vector<std::string>{"sink"}, 0.0f, 1000.0f), .input_nodes = {"temp"}, .output_nodes = {"sink"}, .execution_order = 1}); |
