ComputeShader Performance issue

I'm doing Tile-Based Deferred Rendering recently.What surprise me is that it takes 2ms only to set up a empty compute shader(iPhone6 iOS 9.2) and the frame time add up to 10ms just applying Apple's sample code "MetalImageProcessing" greyscale filter to my output image.Is an iphone capable of doing TBDR considering the bad performance of Metal Compute shader?

Answered by wcm in 109204022

Running the MetalImageProcessing sample out of the box on an iPhone 6, I see 1.1 ms/frame spent on the CPU and 2.6 ms/frame spent on the GPU. Those numbers will certainly go up if you apply a filter to a larger image, but it's difficult to know where you might be spending your time without knowing the details of your application. Have you tried using "Capture GPU Frame" in Xcode to profile your shader? Also, if you can share a version of your project that demonstrates worse-than-expected performance, please file a Radar at bugreport.apple.com with as much detail as possible.

Isn't TBDR the default and only render architecture in IOS devices whether or not Metal is used?

Accepted Answer

Running the MetalImageProcessing sample out of the box on an iPhone 6, I see 1.1 ms/frame spent on the CPU and 2.6 ms/frame spent on the GPU. Those numbers will certainly go up if you apply a filter to a larger image, but it's difficult to know where you might be spending your time without knowing the details of your application. Have you tried using "Capture GPU Frame" in Xcode to profile your shader? Also, if you can share a version of your project that demonstrates worse-than-expected performance, please file a Radar at bugreport.apple.com with as much detail as possible.

ComputeShader Performance issue
 
 
Q