Show HN: Computesim, learn compute shaders and control flow
github.comHey HN, I wrote a compute shader emulator that started as a 50-line script to help me understand reduction shaders. What makes this implementation interesting is its technical approach; I've leveraged Nim's macros and closure iterators to simulate lockstep execution of logical threads. The emulator runs GPU compute shaders on CPU, simulating workgroups and subgroups with proper synchronization. It supports GLSL subgroup operations and provides nice debugging messages. The emulator works with Nim code that follows compute shader patterns
I've documented some technical aspects here: https://x.com/planetis_m/status/1873857578931011614 Demo/Repo: https://github.com/planetis-m/compute-sim
No comments yet.