Search Unity

Tracing instruments messages when profiling app

Discussion in 'iOS and tvOS' started by maik, May 2, 2012.

  1. maik

    maik

    Joined:
    Dec 4, 2011
    Posts:
    59
    Hi,

    Is there a way to trace instruments messages/logs when profiling an unity ios app?

    For example, i get this 3:


    "glUniform4fv(9, 1, {0.7500000f, 0.7500000f, 0.0000000f, 0.0000000f})
    OpenGL ES Analyzer detected a GL function call that sets a piece of GL state to its current value. Minimize the number of these redundant state calls, since these calls are performing unnecessary work."

    "Your application used the same vertex array configuration for multiple consecutive calls to glDrawArrays or glDrawElements. Use vertex array objects (VAOs) to encapsulate the vertex array configuration, allowing optimal reuse of that configuration across multiple draw calls. See documentation on glGenVertexArraysOES and glBindVertexArrayOES."

    "OpenGL ES Analyzer detected a slow texture upload. Optimal performance can be achieved when the texture region to be updated has size and offset values that are multiples of 32 texels. It may be possible to improve performance by tightly packing the image data, and setting GL_UNPACK_ALIGNMENT to 1. For subimage uploads, ensure that the pixel format of the uploaded data is the same format as the destination texture."


    Is there a way to know what part of my code generated it?


    Thank you.
     
  2. maik

    maik

    Joined:
    Dec 4, 2011
    Posts:
    59
    anyone?
     
  3. TrialByFun

    TrialByFun

    Joined:
    Jun 23, 2009
    Posts:
    97
    I've started wondering about this myself.

    My Instruments OpenGL Analyzer is reporting 137176 occurrences of glUniform3fv(8,1,{0.000000f,10.976354f,-10.000000f})
    and lots of suggesting that i use VAO objects instead as my submitted vertex data is identical between frames. Or fix a lot of redundant state calls. Pretty much the same as you actually.

    I'm not sure WE can do anything find out what might be the cause of these problems though as the user isn't exposed to these low state changes.

    Unless someone from Unity can chip in with suggestions?