I'm coming across deploying a Metal render loop as a chain of multiple KCS (kernel/compute) shaders and VFS (vertex/fragment) shaders:
texture -> [KCS -> VFS -> KCS -> VFS] --\
--->[KCS -> KCS] --> presentable
texture -> [KCS -> VFS -> KCS -> VFS] --/
The output of one shader is the input to the next. The two sets of 4 alternating shaders are combined near the end, as shown.
If I'm thinking this through rightly, I'll need up to 10 disparate pipeline descriptors in order to make this happen, along with a lot of calls to completion handlers in which the next shader will be dispatched.
I also haven't indicated it, but the last call to presentable will also feed subregion of its output fed into a separate MTKView (via a vertex/fragment shader).
Any hints would be appreciated.