Hi
I have create the texture using CVMetalTextureCacheCreateTextureFromImage, It's looks like return a UnsafeMutablePointer<CVMetalTexture?>, and I pass it to metal shader using CVMetalTextureGetTexture. use this way looks like have memory leak, how to release the texture is correct way? I tried call CVMetalTextureCacheFlush but it not working.
Thanks
Chengliang
Part of code:
var texture: CVMetalTexture? = nil
let status = CVMetalTextureCacheCreateTextureFromImage(kCFAllocatorDefault, textureCache, pixelBuffer, nil, pixelFormat, width, height, planeIndex, &texture)
...
encoder.setTexture(CVMetalTextureGetTexture(self.texture), index: 0)
Post
Replies
Boosts
Views
Activity
I am using Frame Capture Debugging Tools works well for vertex shader functions, but I can't debug the compute function, the debug button is gray and show me Unsupported Post vertex transform data.