summaryrefslogtreecommitdiff
path: root/src/tests/gpu/test_effect_base.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-17 08:46:01 +0100
committerskal <pascal.massimino@gmail.com>2026-02-17 08:46:01 +0100
commit7041babc9e5333d01191f3eb80fd711bd26cd4f7 (patch)
treeef2dcaa72e36de5e2300c96cf1b731db5021b1a6 /src/tests/gpu/test_effect_base.cc
parent9876148b3b6dcd4604fac5518d11f097069e8cfa (diff)
feat: add time-based effect activation with auto-passthrough
Effects now accept start/end time parameters and automatically passthrough when inactive. Implements buffer chain integrity via compile-time validation. - Effect base class: dispatch_render() checks time bounds, auto-passthroughs 1:1 input/output effects outside [start, end] interval - seq_compiler.py: validates producer/consumer lifespan constraints for multi-output effects, adds --validate flag, always validates before codegen - Updated all 9 effect classes and test fixtures to pass start/end times - check_all.sh: includes timeline validation step - Tests: 34/34 passing, demo runs successfully Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/tests/gpu/test_effect_base.cc')
-rw-r--r--src/tests/gpu/test_effect_base.cc8
1 files changed, 5 insertions, 3 deletions
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();