i did a test.
download
OfficialExample
run
xcrun --sdk iphoneos metal -miphoneos-version-min=11.0 -gline-tables-only -std=ios-metal2.0 -c -frecord-sources my_mac_path/UsingARenderPipelineToRenderPrimitives/Renderer/AAPLShaders.metal -o destAirPath/AAPLShaders.air
run
xcrun --sdk iphoneos metal -frecord-sources destAirPath/AAPLShaders.air -o destMetalLib/AAPLShaders.metallib
add the metallib to project, and load the library with newLibraryWithFile, reference
Offical Article
if i enable metal gpu frame capture, it must be crash while execute newFunctionWIthName on xcode 13.0
if remove -gline-tables-only and -frecord-sources, regenerate metallib, run, it's ok.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: