Post

Replies

Boosts

Views

Activity

Comment on CoreImage memory build up on real device but not on simulator
Good question. I would recommend to use the startTask(...) APIs of CIContext to render to a CIRenderDestionation. You get a CIRenderTask object back, on which you can call waitUntilCompleted() to get a CIRenderInfo object. When you Quick Look that in Xcode (mark the variable and press space), you get a very detailed render graph that, among many other useful info, shows how much memory the render pass required.
2w
Comment on CoreImage memory build up on real device but not on simulator
Hmm, this looks to me like a problem with profiling itself. If you run the experiment just in Xcode and watch the memory graph, you'll see that memory will return to normal a little while after rendering. Even if spamming the button, memory stays well within the resource limits. I don't know why, when profiling with instruments, those small 4 MiB surfaces don't get released. 🤷‍♂️
2w
Comment on Capturing & Processing ProRaw 48MP images is slow
Deferred here means that it's doing the bulk of the work later, but gives you something you can use and show the user quickly. So you can quickly show a preview of the capture (the 12 MP image) and a few seconds later update it with the fully processed 48 MP image. Since you want to use CIRawFilter, I'm afraid you have to wait for the full image to arrive before you can present the user with editing controls. But you can use the smaller image to bridge the UI transition.
Mar ’25
Comment on CIImageProcessorKernel using Metal Compute Pipeline error
On iOS, there is a watch dog that kills processes on the GPU that run too long. I don't think there is much you can do to change the timing limit. The only way to prevent that is to improve the runtime of your algorithm. You could also try splitting up the work into multiple steps, if possible. E.g., by splitting up the images into regions and performing the regression on the regions first, and then once more on the results of step one.
Topic: Graphics & Games SubTopic: Metal Tags:
Aug ’24