I am having problems with a shader that makes use of tables. It appears that the tables are not being uploaded. Only the first element of the array seems to be transferred -- the others seem to be zero. This happens in the Adreno 200, 205, 220 and 225. The shader woks fine on GPUs from other manufacturers. Is there any way that I can get this to work, or do I need to blacklist Adreno?
Setting table:
glUniform1fv(gidDelta, 16, delta);glUniform1fv(gidCoeff, 16, coeff);
Fragment shader
uniform mediump float delta[16];uniform mediump float coeff[16];uniform highp vec2 dir;uniform lowp int rad;uniform lowp sampler2D srcBM;varying highp vec2 srcCoord;void main() {mediump vec4 acc = texture2D(srcBM, srcCoord) * coeff[0];highp vec2 d;for (lowp int i = 1; i <= rad; ++i) {d = dir * delta[i];acc += (texture2D(srcBM, srcCoord + d) + texture2D(srcBM, srcCoord - d)) * coeff[i];}gl_FragColor = acc;}
Thanks for reporting this problem. We've had some recent fixes to our shader compiler that might address this.
1) Could you let us know the most current device and update you see this problem occuring in? It would be good to get the OS and build information from the about device screen.
2) Is there an apk you could share which duplicates the problem?
thanks