title: OpenGL ES - vector uniforms not found - only Matrices work
body: <p>I try to make an app with OpenGLES 2. There are 2 devices for testing.
  Unfortunately there seems to be a difference between both.</p>
  
  <p>I have the following "basic" shader code for testing:</p>
  
  <pre><code>// vertex shader
  
  uniform mat4 uVMatrix;          // View Matrix
  uniform mat4 uPMatrix;          // perspective Matrix
  uniform vec3 uLight1Pos;        // LightPos
  
  attribute vec4 aPosition;
  attribute vec4 aColor;
  
  varying vec4 vColor;
  
  void main() {
      vColor = aColor;
      mat4 MVPMatrix = uPMatrix * uVMatrix;   
      gl_Position = MVPMatrix * aPosition;
  }
  
  // fragment shader
  
  uniform mat4 uVMatrix;
  uniform vec3 uLight1Pos;
  
  varying vec4 vColor;
  varying vec3 vPosition;
  
  void main() { 
      vec3 light2Pos = uLight1Pos;    
      gl_FragColor = vColor;
  }
  </code></pre>
  
  <p>The problem is, some uniforms can't be found.</p>
  
  <p>I attach and link the shader as usual but checking the IDs like:</p>
  
  <pre><code>uVMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uVMatrix");
  uPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uPMatrix");
  uLight1PosHandle = GLES20.glGetUniformLocation(mProgram, "uLight1Pos");
  </code></pre>
  
  <p>I get different values.
  On my Galaxy S1 it is <strong>2, 1, 3</strong> (so all valid values - even though a weird order).
  On my Galaxy S3 it is <strong>0, 1, -1</strong> (so the last one can not be found).</p>
  
  <p>What am I doing wrong? Do I have to declare uniform differently on a S3 (Mali GPU)?
  I realized that I have to "use" the uniforms in order to get a reference. That is the reason why I wrote <em>vec3 light2Pos = uLight1Pos;</em> If I dont do this, I also get no reference on the S1.</p>
  
  <p>Thank you for your help!</p>
  
  <p>Tobias</p>
  
  <p><strong>- EDIT -</strong> </p>
  
  <p>Weird enough, I tried to change the uniform of the vertex shader from <em>vec3</em> to a <em>mat4</em>:</p>
  
  <pre><code>uniform mat4 uLight1Pos;
  mat4 lPos = uLight1Pos; 
  </code></pre>
  
  <p>It appears that <strong>matrices work fine</strong> and I can get a handle for it when using a matrix. How comes?</p>