Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ryanmyers: Improve logging for Metallib function lookup failures (#7836)
If a .metallib was compiled with a target iOS version that's newer than the current device, loading the .metallib may succeed, but finding main0 (or any other function in it) will fail. Currently, this causes a crash due to an assert. Logging the error and returning MetalFunctionBundle::error() makes the crash slightly easier to diagnose. (Note that in practice, this will probably be a useless "Compiler encountered an internal error" message -- the GPU backend is crashing, and the Metal stub library sees XPC_ERROR_CONNECTION_INTERRUPTED. It retries up to 3 times (crashing each time) and then gives up.)
- Loading branch information