Search Unity

iOS project not using GPU ?

Discussion in 'iOS and tvOS' started by super77gg, Apr 22, 2015.

  1. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    Hello,

    We have a strange issue. Unity's Profiler and the XCODE profiler are reporting 0 usage in GPU for our project. Under Unity's Application Profiler, we see mass GPU based tasks taking place on the CPU.

    Under the Unity / Xcode Internal Profiler we see:
    cpu-ogles-drv> min: 0.0 max: 0.0 avg: 0.0

    Has anyone else experienced this or have an idea what's up? We've tried building out in all formats (gl 2, gl 3 and metal). I'm sure we are doing something dumb or missing a setting somewhere. We are using 5.0.1p3


    Thanks <3


     
  2. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    We've tested both on iPad Mini Gen1 and iPhone 6 - both reporting 0 GPU use... We created a brand new project as a test with some Cubes and a Particle System.

    Here's the full Dump from Console.

     
  3. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,437
    >>XCODE profiler are reporting 0 usage in GPU for our project
    >>Initializing Metal device caps

    in xcode go to product->scheme->edit scheme
    change GPU frame capture to be metal (or gles if you run on no-metal device or force gles in player settings)
     
  4. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    @Alexey Thanks for the quick reply! I've enabled the Metal Device the GPU Frame Capture. However that doesn't seem to solve the issue. Here's the dump from that test:


     
  5. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,437
    now you are looking into wrong place - do you want to check GPU usage? look in xcode itself - it will show graph when you select "debug" tab
     
  6. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,057
    I *think* I saw Xcode showing the GPU usage as 0 when the value was off the scale - i.e. the performance was so terrible it was beyond any reasonable limits
    (I might not remember correctly)
     
  7. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    Thanks guys - we will continue to look into this. Just so I'm aware - even if we force project ot use Open GLES 2.0, we should still expect to see : cpu-ogles-drv> min: 0.0 max: 0.0 avg: 0.0 on the internal profiler ?
     
  8. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,157
    I've got the same problem, using Unity 4.6.5. The FPS panel of the xcode profiler has 0 FPS and empty spaces where there used to be graphs of GPU usage.
     

    Attached Files:

  9. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,437
    >>cpu-ogles-drv> min: 0.0 max: 0.0 avg: 0.0 on the internal profiler ?
    i think this is no longer updated from inside unity itself. Why we didnt kill it? i dunno honestly 8)
    >>The FPS panel of the xcode profiler has 0 FPS
    1. Make sure you picked appropriate api in product->scheme->edit scheme->Gpu Frame Capture
    2. we noticed some issues with xcode tools VS the way we handle display link.
    Check UnityAppController+Rendering.mm in trampoline, it has this comment:
    Code (csharp):
    1.  
    2. // NB: if you intend yo use xcode GPU report (FPS category in Debug Session) you want to set ENABLE_DISPATCH to 0
    3. // otherwise xcode gets confused and think CPU time was 0
    4.  
     
  10. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    It seems the iPhone 6 or newer use metal graphic api. GPU Report will not work If the GPU Frame Capture set to "Automatically Enabled".
    According the info here. If I changed the GPU Frame Capture to "Metal", it works fine now with my iPhone 6.
    2 set GPU capture.png
     
  11. hundaxxx

    hundaxxx

    Joined:
    Jan 28, 2016
    Posts:
    1
    It seems not worked in Unity after I choose the "Metal" in Xcode.Does GPU Report work only in Xcode?
     
  12. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    I believe the setting of the Unity is not related to GPU Report setting, so yes, it should be set in Xcode.
     
unityunity