1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. We want to know how you learned Unity! Help us by taking this quick survey and have a chance at a $25 gift card
    Dismiss Notice
  5. Are you an artist or level designer going to Unite Europe? Join our roundtables there to discuss artist features.
    Dismiss Notice
  6. Unity 5.6 is now released.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice

iOS project not using GPU ?

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

  1. nate77

    nate77

    Joined:
    Sep 25, 2014
    Posts:
    42
    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. nate77

    nate77

    Joined:
    Sep 25, 2014
    Posts:
    42
    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,371
    >>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. nate77

    nate77

    Joined:
    Sep 25, 2014
    Posts:
    42
    @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,371
    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:
    342
    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. nate77

    nate77

    Joined:
    Sep 25, 2014
    Posts:
    42
    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:
    1,230
    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,371
    >>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:
    465
    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:
    465
    I believe the setting of the Unity is not related to GPU Report setting, so yes, it should be set in Xcode.