Forums - can't get 100% alu capability on Nexus 4

3 posts / 0 new
Last post
can't get 100% alu capability on Nexus 4
chen20062308
Join Date: 21 Apr 13
Posts: 10
Posted: Wed, 2013-05-15 18:32

Hi,

I'm using Nexus 4 to develop games, but can't get high performance. Then I use simple fragement shaders to test.

The first code using MAD is  as below:

 

precision mediump float; 
uniform mediump vec4 color_in;
void main() {
mediump vec4 color_out1 = color_in;
for(int i = 0; i < 100; i ++)
{
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
color_out1 = color_out1 * color_in + color_in;
}
    gl_FragColor = color_out1;
}
 
Using above fragement shader, I only get 80% alu capability from the result of adreno profiler.
 
The second code using MUL is  as below:
 
precision mediump float; 
uniform mediump vec4 color_in;
void main() {
mediump vec4 color_out1 = color_in;
for(int i = 0; i < 100; i ++)
{
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
color_out1 = color_out1 * color_in ;
}
    gl_FragColor = color_out1;
}
 
Using above fragement shader, I only get 100% alu capability from the result of adreno profiler.
 
Why MAD operation can't get 100% alu capabilty?

 

  • Up0
  • Down0
seano
Join Date: 12 Apr 13
Posts: 4
Posted: Thu, 2013-05-16 10:47

I see you have the profiler working on Nexus 4!  Got any tips on how you did that? Qualcomm hasn't been answering my questions I've posted in the last few days about this.

If you can help me get it running on my nexus 4, I'll see if I can help come up with an ALU test.  The problem I have is the WARNING! ADB found a device, but no Adreno profiler enabled application can be found..."  I get the same message if I try their Skinning2 demo or "Reign of Amira"

 

 

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Tue, 2013-05-21 10:10

It's possible that the shader compiler is doing some unforeseen optimization, or that there is something happening with the geometry to cause a stall.

 

Can you provide us with the complete shaders (vertex and fragment) and perhaps a sample program that you're using? (having it available on a dropbox would be great)

 

Also which version of the Adreno Profiler are you using?  It might be good to know what alu capability it is reporting.

-mark

 

 

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