Offline Compilation: Still unable to extract pipeline script with Xcode 14 RC

I tried with the latest Xcode 14 RC, but still am unable to extract a pipeline script from a harvested binary archive, as per WWDC 2022 session video.

Here's what I've tried (Runnable XCode project on Github):

// Create a simple render pipeline
let device = MTLCreateSystemDefaultDevice()!
let lib = device.makeDefaultLibrary()!
let pipelineDesc = MTLRenderPipelineDescriptor()
pipelineDesc.vertexFunction = lib.makeFunction(name: "main_vertex")
pipelineDesc.fragmentFunction = lib.makeFunction(name: "main_fragment")
pipelineDesc.colorAttachments[0]?.pixelFormat = .bgra8Unorm

// Harvest GPU Archive
let archivePath = NSTemporaryDirectory().appending("harvested-archive.metallib")
let archiveDesc = MTLBinaryArchiveDescriptor()
let archive = try device.makeBinaryArchive(descriptor: archiveDesc)
try archive.addRenderPipelineFunctions(descriptor: pipelineDesc)
try archive.serialize(to: NSURL.fileURL(withPath: archivePath))

// In a terminal...
> xcrun metal-source -flatbuffers=json harvested-archive.metallib -o descriptors.mtlp-json

Unfortunately, metal-source produces a directory of metallibs and no pipeline JSON script in sight.

Did I miss something? Has the process changed since the WWDC 2022?

Thanks.

I have got the same result, does there any solution now? xcrun -sdk macosx metal-source -flatbuffers=json binaryArchive_1007_iOS16_0_4000000000000f_ec60895_810997981_2154888147.metallib -o ./descriptors.mtlp-json

Then I also try to use the directory "descriptors.mtlp-json" as **** ,and failed: SHINESHWANG-MC0:ios16 shineshwang$ xcrun -sdk macosx metal-tt fpstrunk1_sf_metal.0.metallib descriptors.mtlp-json -o ba0.metallib applegpu-nt: cannot read 'descriptors.mtlp-json' metal-tt: applegpu-nt command failed

Offline Compilation: Still unable to extract pipeline script with Xcode 14 RC
 
 
Q