summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-16 08:47:11 +0100
committerskal <pascal.massimino@gmail.com>2026-02-16 08:47:11 +0100
commitf4f65e006557c1f4a6b33a903e96b65fd983dee6 (patch)
tree93ee230abf9f5f0c4e35ba265ec3a89ef02ff010
parent77c3389fdadc1f3d595dcc9f1a8d34be4255806f (diff)
feat(sequence): Clean up compiler and add test accessor
- Remove debug output from seq_compiler_v2.py - Add get_effect_dag() accessor for testing - Add e2e test skeleton (shader compatibility pending) handoff(Claude): v2 foundation complete, 3 phases done
-rw-r--r--cmake/DemoTests.cmake9
-rw-r--r--src/gpu/sequence_v2.h5
-rwxr-xr-xtools/seq_compiler_v2.py10
3 files changed, 14 insertions, 10 deletions
diff --git a/cmake/DemoTests.cmake b/cmake/DemoTests.cmake
index 3e54ea2..2f7cdd1 100644
--- a/cmake/DemoTests.cmake
+++ b/cmake/DemoTests.cmake
@@ -243,6 +243,15 @@ add_demo_test(test_sequence_v2 SequenceV2Test gpu
target_link_libraries(test_sequence_v2 PRIVATE 3d gpu audio procedural util ${DEMO_LIBS})
demo_add_asset_deps(test_sequence_v2 shaders)
+# Sequence v2 End-to-End Test
+add_demo_test(test_sequence_v2_e2e SequenceV2E2ETest gpu
+ src/tests/gpu/test_sequence_v2_e2e.cc
+ src/tests/common/webgpu_test_fixture.cc
+ ${PLATFORM_SOURCES}
+ ${GEN_DEMO_CC})
+target_link_libraries(test_sequence_v2_e2e PRIVATE 3d gpu audio procedural util ${DEMO_LIBS})
+demo_add_asset_deps(test_sequence_v2_e2e shaders)
+
# Subsystem test targets
add_custom_target(run_audio_tests
COMMAND ${CMAKE_CTEST_COMMAND} -L audio --output-on-failure
diff --git a/src/gpu/sequence_v2.h b/src/gpu/sequence_v2.h
index 9cd93c6..1cc5f47 100644
--- a/src/gpu/sequence_v2.h
+++ b/src/gpu/sequence_v2.h
@@ -96,6 +96,11 @@ class SequenceV2 {
void resize(int width, int height);
+ // Test accessor
+ const std::vector<EffectDAGNode>& get_effect_dag() const {
+ return effect_dag_;
+ }
+
protected:
const GpuContext& ctx_;
int width_;
diff --git a/tools/seq_compiler_v2.py b/tools/seq_compiler_v2.py
index 56bf613..6ae6283 100755
--- a/tools/seq_compiler_v2.py
+++ b/tools/seq_compiler_v2.py
@@ -332,8 +332,6 @@ def detect_ping_pong(seq: SequenceDecl, sorted_effects: List[EffectDecl]) -> Dic
eff1 = sorted_effects[i]
eff2 = sorted_effects[i + 1]
- print(f"DEBUG: Checking pair {i}: {eff1.class_name}({eff1.inputs}->{eff1.outputs}) and {eff2.class_name}({eff2.inputs}->{eff2.outputs})", file=sys.stderr)
-
# Find nodes that alternate
for out1 in eff1.outputs:
if out1 in ['source', 'sink'] or out1 in used_nodes:
@@ -343,32 +341,24 @@ def detect_ping_pong(seq: SequenceDecl, sorted_effects: List[EffectDecl]) -> Dic
if in1 in ['source', 'sink'] or in1 in used_nodes:
continue
- print(f"DEBUG: Testing out1={out1}, in1={in1}: in1 in eff2.outputs={in1 in eff2.outputs}, out1 in eff2.inputs={out1 in eff2.inputs}", file=sys.stderr)
-
# Check if eff2 writes in1 and reads out1 (alternating)
if in1 in eff2.outputs and out1 in eff2.inputs:
# Classic ping-pong: eff1 (reads in1, writes out1), eff2 (reads out1, writes in1)
- print(f"DEBUG: Found potential ping-pong: {in1} <-> {out1} between {eff1.class_name} and {eff2.class_name}", file=sys.stderr)
-
# Check no other effects use these nodes
other_uses = False
for j, eff in enumerate(sorted_effects):
if j == i or j == i + 1:
continue
if out1 in eff.inputs + eff.outputs or in1 in eff.inputs + eff.outputs:
- print(f"DEBUG: Other effect {eff.class_name} uses {out1 if out1 in eff.inputs + eff.outputs else in1}", file=sys.stderr)
other_uses = True
break
if not other_uses:
- print(f"DEBUG: Aliasing {in1} -> {out1}", file=sys.stderr)
# Alias in1 -> out1 (in1 uses same texture as out1)
aliases[in1] = out1
used_nodes.add(out1)
used_nodes.add(in1)
break
- else:
- print(f"DEBUG: Skipping alias due to other uses", file=sys.stderr)
return aliases