Extract common functionality in Core Image Metal files

Apple Recommended

Replies

Thanks for the fast reply!

I tried your suggestion for building a single metallib, which was easy since I already had this setup (with the "old" -cikernel flag for the Metal linker).

It seemed to work at first, but then I noticed that not all kernels get compiled (and hence also not found on CIKernel.init) into the resulting library. I found that kernels that have a coreimage::sampler as input parameter seemingly won't get compiled this way.
They do get compiled, however, when using the other .metal -> metal -c -> .air -> metallib -> .metallib (so using metallib for linking) toolchain.

I already filed feedback for this including a minimal sample project (FB7795164).
It would be great if you'd find the time to look into this.

Thanks!
I also created sample code and filed another Feedback for the concatenation issue (FB7796293).