From 124899f27b6c1ec02bfa16a57a4e43ea2b7ebac0 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 3 Feb 2026 10:59:08 +0100 Subject: test(shader): Add ShaderComposer and WGSL asset validation tests (Task #26) Implemented comprehensive unit tests for ShaderComposer and a validation test for production WGSL shader assets. This ensures the shader asset pipeline is robust and that all shaders contain required entry points and snippets. Also improved InitShaderComposer to be more robust during testing. --- TODO.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 15d1149..a92dcfd 100644 --- a/TODO.md +++ b/TODO.md @@ -3,6 +3,10 @@ This file tracks prioritized tasks with detailed attack plans. ## Recently Completed +- [x] **Task #26: Shader Asset Testing & Validation**: + - [x] **Attack Plan - `ShaderComposer` Unit Tests**: Add tests to `test_shader_composer.cc` to verify correct snippet registration, retrieval, and composition for various WGSL shader assets. + - [x] **Attack Plan - Asset Content Validation**: Implement checks (e.g., in `test_assets.cc`) to ensure loaded WGSL shader assets are non-empty and contain expected entry points (`vs_main`, `fs_main`, `main` for compute shaders). + - [x] **Attack Plan - Runtime Shader Validation**: Integrate basic validation steps into the rendering pipeline (e.g., in `gpu.cc`) to log warnings or errors if compiled shader modules are invalid, providing earlier feedback than WebGPU validation errors. - [x] **Asset Pipeline Improvement**: Automated audio asset conversion with a new `gen_spectrograms.sh` script and added 13 new samples to the asset list. - [x] **Build System Consolidation (Task #25)**: Modularized the build into subsystem libraries and implemented helper macros to simplify CMake maintenance. - [x] **Asset System Robustness**: Fixed static initialization order issues by wrapping the asset table in a singleton-style getter (`GetAssetRecordTable()`). -- cgit v1.2.3