Found a code generation bug in GLSL compiler:
uniform mat4 BlendMatrixArray[48]; // Doesn't work on Adreno (other OpenGL ES devices OK): // putting a mat4() around BlendMatrixArray[blendIndices.x] doesn't help either blendPos += vec4((vec4(streams.Position.xyz, 1.0) * BlendMatrixArray[blendIndices.x]).xyz, 1.0) * 1.0; // Creating intermediate variable works everywhere: mat4 m = BlendMatrixArray[blendIndices.x]; blendPos += vec4((vec4(streams.Position.xyz, 1.0) * m).xyz, 1.0) * 1.0;
Also, the non-working version shows 11 ALU instruction in profiler, whereas working version shows 13 ALU instruction, clearly showing something went wrong in the code generator (maybe too aggressive optimizations?)
Hope it helps. Thanks!
Thanks for reporting this. Could you let us know which device, OS, and build you are running the compiler on?