diff options
| -rw-r--r-- | PROJECT_CONTEXT.md | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index 90f85f4..effc1c3 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -35,9 +35,10 @@ Style: ### Current Status - Audio system: Sample-accurate synchronization achieved. Uses hardware playback time as master clock. Variable tempo support integrated. **Pipeline optimized (Task #72)**: Zero heap allocations per frame, direct ring buffer writes, explicit clipping. Comprehensive test coverage maintained. - Build system: Optimized with proper asset dependency tracking -- Shader system: Modular with comprehensive compilation tests +- Shader system: Modular with comprehensive compilation tests. **WGSL composability improved**: Common utilities extracted (`math/common_utils.wgsl`) with 12 call sites deduplicated across renderer shaders. - 3D rendering: Hybrid SDF/rasterization with BVH acceleration and binary scene loader. **Object data loading and parsing pipeline enhanced for primitives (e.g., plane_distance).** - Asset pipeline: Blender export script and binary scene ingestion supported +- Error handling: **Dual macro system**: `FATAL_XXX` for programming errors (abort), `CHECK_RETURN` for recoverable errors (graceful return). Messages stripped in STRIP_ALL builds. --- ## Next Up @@ -50,10 +51,10 @@ Style: - Phase 3: File I/O (load .wav/.spec, export procedural_params.txt + C++ code) - See `doc/SPECTRAL_BRUSH_EDITOR.md` for complete design -- **Task #72: Audio Pipeline Streamlining** - - Optimize data flow: reduce copies and temp buffers. - - Direct additive mixing: have tracker add samples directly to output buffer. - - Precision: maintain float32 internally, clip/convert at the very end. +- **Task #72: Audio Pipeline Streamlining** [COMPLETED - February 8, 2026] + - ✅ Optimize data flow: Zero heap allocations per frame achieved + - ✅ Direct additive mixing: Ring buffer two-phase write API + - ✅ Precision: float32 internal pipeline with explicit clipping - **Visuals & Content** - [ ] **Task #52: Procedural SDF Font**: Minimal bezier/spline set for [A-Z, 0-9] and SDF rendering. @@ -86,6 +87,25 @@ Style: --- *For a detailed list of all completed tasks, see the git history.* +## Recently Completed (February 2026) + +- **WGSL Shader Composability** - Extracted common utilities to `math/common_utils.wgsl`: + - `transform_normal()` - 2 call sites (renderer_3d, mesh_render) + - `spherical_uv()` / `spherical_uv_from_dir()` - 8 call sites (renderer_3d, skybox) + - `grid_pattern()` - 2 call sites (renderer_3d) + - Size savings: ~200 bytes net + +- **Test Suite Optimization** - JitteredAudioBackendTest: 3.5s → 0.07s (50x speedup) + - Reduced test duration and sleep times + - Full CI suite now <1 second + +- **CHECK_RETURN Macro System** - Error handling for recoverable errors: + - `CHECK_RETURN_IF()` - Simple validation with return + - `CHECK_RETURN_BEGIN/END` - Complex validation with cleanup + - `WARN_IF()` - Non-fatal warnings + - Applied to 5 call sites (asset_manager, test_demo) + - Size impact: ~500 bytes saved in STRIP_ALL builds + ## Architectural Overview ### Hybrid 3D Renderer |
