Proper generic kernel fusion is *so* complicated. Making it work for a trivial 1...
Andrew Zonenberg @azonenberg@ioc.exchange
Proper generic kernel fusion is *so* complicated.
Making it work for a trivial 1:1 case is easy, but considering more complicated scenarios like "shader needs another SSBO as a scratch buffer or to read a large block of constants from", or "input and output are not 1:1" or even "shader has multiple outputs" complicates things dramatically.
But I don't want to rush out an incomplete half-baked solution that will have to be ripped out later on.
Even the trivial one I'm doing now, a 2-tap FIR emphasis filter followed by sin(x)/x upsampling, involves an extra constant buffer and a 1:n input-to-output mapping.