Forums - What should i optimize for Mobile Development? Unity games

3 posts / 0 new
Last post
What should i optimize for Mobile Development? Unity games
resetme
Join Date: 14 Jul 17
Posts: 6
Posted: Wed, 2018-03-21 22:52

Hi there,

 

Im using Snapdragon Profile to optimize some shaders but im not quite sure what should i look at.

At the moment all my optimizations are :

-reducing numbers of Total Instructions in Fragment Shader and Vertex Shader
-reducing the numbers of NOOPS as i saw in youtube videos (i trie to keep all my shader around 10)
-using Half Precision

But i cant actually see any diference even after following those procedures, i had a shader with 50 Noop that i recuded to 11 Noops, but frame rate, device heat dont change at all, so im not sure how to check those optimizations.

What else do i need to look at?
Short Latency Sync?
Number of ALU?
Interpolation Instructions?

 

Any good tutorial?

Regards

Francisco.

  • Up0
  • Down0
Carlos Dominguez Moderator
Join Date: 27 Jul 15
Location: San Diego
Posts: 110
Posted: Mon, 2018-03-26 13:56

Hi Fran,

To back up a little bit, have you verified that your app/game is indeed GPU bound and not CPU? if so I'd recommend taking a look at the Adreno developer guide (https://developer.qualcomm.com/software/adreno-gpu-sdk/tools). From my experience some of the biggest impact and good ROI things tend to be:

Take an 'OpenGL->Rendering Stages' Trace capture and look for the following:
*Confirm there are no gaps between surface render blocks, this will confirm that the app is GPU bound as the GPU will be busy all the time
*Make sure your application isn't incurring on any 'GMEM Loads' from the captured data. Note that 'GMEM Stores' are OK and correct but loads tend to be unintentional, cause a significant amount of wasted surface render time and can usually be fixed with a few lines of code having a great optimizaiton ROI.
*Try to minimize the amount of tiles the GPU generates. Inspect the surfaces that you are rendering to by clicking on them and looking at the properties they have in the 'Inspector View'. Make sure all the targets attached to each surface are needed and if not remove them. If you don't need stencil then consider using depth16 instead of depth24stencil8. 

Take a Snapshot capture with the 'Clocks' metric and identify the heaviest drawcalls, then map those to the corresponding shaders and use per drawcall metrics to narrow down which part of the GPU pipleine is being bottlenecked.

Again I would highly recommend reading the Adreno developer guide as having a good understanding of tiling architecure is key to better understand where the bottlenecks could be.

Carlos

  • Up0
  • Down0
resetme
Join Date: 14 Jul 17
Posts: 6
Posted: Mon, 2018-03-26 23:59

Thank you so much for taking yout time.

I will check all those adreno optimizations links and im sorry for my bad english, i wrote it in a hurry.

I dont think the game we are working on is GPU bound but the engenier team keep saying that the shaders are heavy, (checking unity profiler).
My test was creating a replacement shader and convert all those  "heavy" shader to UNLIT, the FPS diferrence was minimun. pretty sure the fps drops is fault of overdraw with the effect team.

Anyway, appreciate your help!

Regards

Francisco.

  • Up1
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.