0
我正在嘗試MacOS上的MetalImageRecognition示例。metal macOS配置描述符的存儲模式
但是:
**failed assertion `[MPSTemporaryImage prefetchStorageWithCommandBuffer:imageDescriptorList:] Error: the descriptor must be configured with MTLStorageModePrivate'**
運行
MPSTemporaryImage.prefetchStorage(with: commandBuffer, imageDescriptorList: [sid, inid, m0id, m1id, m2id, m3id, m4id, m5id, m6id, m7id, m8id, m9id, m10id])
我看着官方文檔,並試圖將模式設置爲私有時:
let sid = MPSImageDescriptor(channelFormat: textureFormat, width: 299, height: 299, featureChannels: 3, **storageMode: MTLStorageModePrivate**)
但
**Use of unresolved identifier 'MTLStorageModePrivate'**
有誰知道如何設置配置存儲模式?
是的,解決了謝謝 – cccelia