Metal Compiler API

Hi,


is there an API for the metal compiler to allow toolchain integration? I am currently calling the standalone metal, metal-ar..etc cmdline tools and intercept stdout but this doesnt allow interception of "includes" etc. The MTLDevice newLibraryFromSource method only allows targeting the actual device - no cross-compiling (i.e. iOS,macOS).

I was expecting something along the lines of D3DCompile.


Thanks alot!

--

Stephan

There is currently no API to support this. The command-line tools allow you to create metallib files that are targeted to a particular platform with the

-std
option, but the final bytecode that is produced at run-time and actually executed on the device is not available programmatically.


If you would like to see such a feature, please file an enhancement request Radar at http://bugreport.apple.com.

Metal Compiler API
 
 
Q