4

The Xcode->GPU Capture frame->GPU shader profiler can't work, I run the Capture frame, and open the Metal compute shader source code by GPU shader profiler. But I can't see the shader code performance profile like thatGPU shader profiler

冯剑龙
  • 569
  • 8
  • 22
  • 1
    Is your project a Mac app or an iOS app? If it's an iOS app, are you profiling on the device or the simulator? I think you can only get shader per-line profiling on iOS devices. – Ken Thomases Jun 11 '18 at 18:03
  • 1
    Thx, I'm sure it's iOS app, and profiling on My iPhone 7 .I doubted whether some scheme manage setting is wrong. But I check the setting. building configuration is debug, GPU capture frame is Metal, and Metal API Validation is Enable. I also wondered The shader pipeline time is short, but longer pipeline time doesn't work – 冯剑龙 Jun 12 '18 at 01:49
  • What version of iOS and XCode are you using? – bsabiston Jun 12 '18 at 13:56
  • xcode Version 9.3.1 (9E501), iOS 11.3. In fact I has doubt My xcode for a long while, but I don't know xcode has the different version. Do you mean liking Visual Studio's different version? – 冯剑龙 Jun 13 '18 at 10:02

1 Answers1

8

Set your project's "iOS Deployment Target" to a higher version. I had this issue and in my case it was set to 9.x. When I set it to 11.4 I could see the percentage on source lines.

SurvivalMachine
  • 7,946
  • 15
  • 57
  • 87