diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-09 14:13:17 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-09 14:13:17 +0100 |
| commit | 8d6f14793a1edc34644297e2b24248c00bbff3be (patch) | |
| tree | 02d8974f2913aefaac5c49252cb8d820a94bff9b /src | |
| parent | ac11008095589d6136732346cd6a9f2172000d66 (diff) | |
test: Add variable-size texture support verification
Phase 3 complete:
- Verify 128x64 and 1024x512 textures work
- Confirms GpuProceduralParams width/height respected
docs: Add Phase 4 design (texture composition)
- Multi-input compute shaders (samplers)
- Composite generators (blend, mask, modulate)
- Asset dependency ordering
- ~830 bytes for 2 composite shaders
Diffstat (limited to 'src')
| -rw-r--r-- | src/tests/test_gpu_procedural.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tests/test_gpu_procedural.cc b/src/tests/test_gpu_procedural.cc index e84996d..f1bade0 100644 --- a/src/tests/test_gpu_procedural.cc +++ b/src/tests/test_gpu_procedural.cc @@ -87,6 +87,28 @@ int main() { // Test multiple pipelines coexist printf("SUCCESS: All three GPU generators work (unified pipeline system)\n"); + // Test variable-size textures + float noise_small[2] = {999.0f, 8.0f}; + GpuProceduralParams small = {128, 64, noise_small, 2}; + tex_mgr.create_gpu_noise_texture("noise_128x64", small); + if (!tex_mgr.get_texture_view("noise_128x64")) { + fprintf(stderr, "Error: Variable-size texture (128x64) not created\n"); + tex_mgr.shutdown(); + gpu_shutdown(); + return 1; + } + + float noise_large[2] = {777.0f, 2.0f}; + GpuProceduralParams large = {1024, 512, noise_large, 2}; + tex_mgr.create_gpu_noise_texture("noise_1024x512", large); + if (!tex_mgr.get_texture_view("noise_1024x512")) { + fprintf(stderr, "Error: Variable-size texture (1024x512) not created\n"); + tex_mgr.shutdown(); + gpu_shutdown(); + return 1; + } + printf("SUCCESS: Variable-size textures work (128x64, 1024x512)\n"); + // Cleanup tex_mgr.shutdown(); gpu_shutdown(); |
