Damus
note1cpnmg...
Andrew Zonenberg profile picture
Tl;dr identifying dependency chains where two shaders are called back to back without the intermediate result being used anywhere else, and the sample processing is either strictly 1:n or only works in a small window around the input, like a FIR filter below a few dozen samples in size or something.

Then fuse the GLSL for each kernel into a single combined shader, JIT to SPIR-V, and make a single compute shader pipeline from it.
1
Andrew Zonenberg · 4w
Since the vast majority of libscopehal shaders are memory bound, if I can manage to fuse several shaders into a single one and keep the intermediate results in registers, there should be a massive improvement in performance. Fusing just two consecutive 1:1 shaders will halve the memory bandwidth re...