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.
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
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.