From 8d6f14793a1edc34644297e2b24248c00bbff3be Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 9 Feb 2026 14:13:17 +0100 Subject: 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 --- src/tests/test_gpu_procedural.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/tests/test_gpu_procedural.cc') 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(); -- cgit v1.2.3