I'm testing code that runs fine on a Samsung Galaxy Note 10.1" 2014 (Mali-T628) on a Samsung Galaxy S5 (Adreno 330) for the first time and am experiencing a few GLSL (ES 3.0) issues. I'll post different issues to different topics. Note that these are up-to-date production devices I am testing on; I'm unaware if these issues have been resolved in unreleased drivers.
I'm rendering points with GL_POINTS, using gl_PointCoord for texture coordinates. I've been experiencing garbled and corrupted-looking results. Finally by reading numerous posts on this forum, I found that there have been compiler issues relating to expression complexity. My code isn't terribly complex:
#version 300 es
precision mediump float;
uniform sampler2D frame0;
in vec4 color;
layout(location = 0) out vec4 o_fragColor;
void main(void) {
vec4 tex;
tex = texture(frame0, gl_PointCoord);
o_fragColor = color * tex;
}
I (eventually) decided to simplify it according to the other forum posts in the only way I could see. It worked. My workaround is incredibly simple:
#version 300 es
precision mediump float;
uniform sampler2D frame0;
in vec4 color;
layout(location = 0) out vec4 o_fragColor;
void main(void) {
vec4 tex;
vec2 coords = gl_PointCoord.xy;
tex = texture(frame0, coords);
o_fragColor = color * tex;
}
We've been able to both duplicate your problem on an Adreno 330 driver, and also confirm that the problem is fixed in our newer drivers, without the need for the workaround.