diff options
Diffstat (limited to 'src/tests')
| -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(); |
