title: illegal vector field selection length
body: <p>I am receiving this error on a pc where I cannot have access. </p>
  
  <p>The error is on the Vertex Shader of the init program of the depth peeling technique.</p>
  
  <pre><code>ERROR: 0:42: error(#222) Illegal vector field selection length
  ERROR: 0:42: error(#222) Illegal vector field selection length
  ERROR: error(#273) 2 compilation errors. No code generated
  </code></pre>
  
  <p>This is the VS:</p>
  
  <pre><code>#version 330
  
  layout (location = 0) in vec3 position;
  layout (location = 1) in vec3 normal;
  layout (location = 2) in vec2 uv;
  
  out vec3 cameraSpacePosition;
  out vec3 cameraSpaceNormal;
  
  out vec2 oUV;
  
  uniform mat4 modelToWorldMatrix;
  /*
  *   Layout {lighting, normal orientation, hasTexture, selected}
  */
  uniform ivec4 settings;
  
  layout(std140) uniform vehicleMatrices {
      mat4 worldToCameraMatrix;
      mat4 cameraToClipMatrix;
  };
  
  void main()
  {
      vec4 c = worldToCameraMatrix * (modelToWorldMatrix * vec4(position, 1.0));
      gl_Position = cameraToClipMatrix * c;
  
      cameraSpacePosition = c.xyz;
      cameraSpaceNormal = mat3(worldToCameraMatrix) * (mat3(modelToWorldMatrix) * normal);
  
      switch (settings.y) {
  
          case 0:
              cameraSpaceNormal = -cameraSpaceNormal;
              break;
  
          case 1:
              float cosine = dot(cameraSpacePosition, cameraSpaceNormal) / (cameraSpacePosition.length * cameraSpaceNormal.length);
              if ( cosine &gt; 0) 
                  cameraSpaceNormal = -cameraSpaceNormal;
              break;
      }
      oUV = uv;
  }
  </code></pre>
  
  <p>I never had problem with it before, I dev mostly on Nvidia and this one comes from a machine equipped with an ATI FirePro M7740</p>
  
  <p>I also tried to google, of course, but there is no result with the quoted sentence: "illegal vector field selection length"..</p>
  
  <p>I checked tens of time and it looks fine to me, no error on any vector length..</p>
  
  <p>Any clue?</p>