From 4bb084154a4eb4b4f580d52d936cab05ef313ebb Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 4 Feb 2026 12:17:12 +0000 Subject: [PATCH] Add deterministic debug logging to fused pipeline --- test_gpu_effects.sexp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test_gpu_effects.sexp diff --git a/test_gpu_effects.sexp b/test_gpu_effects.sexp new file mode 100644 index 0000000..42cea11 --- /dev/null +++ b/test_gpu_effects.sexp @@ -0,0 +1,38 @@ +;; GPU Effects Performance Test +;; Tests rotation, zoom, hue-shift, ripple + +(stream "gpu_effects_test" + :fps 30 + :width 1920 + :height 1080 + :seed 42 + + ;; Load primitives + (require-primitives "geometry") + (require-primitives "core") + (require-primitives "math") + (require-primitives "image") + (require-primitives "color_ops") + + ;; Frame pipeline - test GPU effects + (frame + (let [;; Create a base gradient image + r (+ 0.5 (* 0.5 (math:sin (* t 1)))) + g (+ 0.5 (* 0.5 (math:sin (* t 1.3)))) + b (+ 0.5 (* 0.5 (math:sin (* t 1.7)))) + color [(* r 255) (* g 255) (* b 255)] + base (image:make-image 1920 1080 color) + + ;; Apply rotation (this is the main GPU bottleneck we optimized) + angle (* t 30) + rotated (geometry:rotate base angle) + + ;; Apply hue shift + hue-shift (* 180 (math:sin (* t 0.5))) + hued (color_ops:hue-shift rotated hue-shift) + + ;; Apply brightness based on time + brightness (+ 0.8 (* 0.4 (math:sin (* t 2)))) + bright (color_ops:brightness hued brightness)] + + bright)))