Running the r3p0 drivers I've hit an issue that no other video drivers(Qualcomm, Mesa, Nvidia, fglrx) seem to hit.
Running a very simple fragment shader as an example.
void main() { ivec2 uv = ivec2(gl_FragCoord.xy); ivec2 ts = textureSize(samp9, 0); vec4 c0 = texelFetch(samp9, ivec2(uv.x / 2, ts.y - uv.y - 1), 0); float y = mix(c0.b, c0.r, uv.x & 1); float yComp = 1.164 * (y - 0.0625); float uComp = c0.g - 0.5; float vComp = c0.a - 0.5; ocol0 = vec4(yComp + (1.596 * vComp), yComp - (0.813 * vComp) - (0.391 * uComp), yComp + (2.018 * uComp), 1.0); }
I'm having an issue with the mix function on line six. Basically the shader compiler doesn't realize that uv.x & 1 will be a boolean result and fails out.
A simple remedy to the issue is wrapping it like "(uv.x & 1) != 0" but in this case it really shouldn't be necessary.
Hope you guys fix the issue.
Thanks for reporting, I will raise with our ESSL compiler team.
Kind Regards, Pete
According to to the OpenGL ES Shading Language 3.0 specification, the language is type safe and there are no implicit conversions between types (see section 4), so we believe our compiler is correctly implementing the specification. Section 5.4.1 in the specification includes a number of examples demonstrating conversion between scalar types.
In your example it is possibly a little neater to use the bool() built-in to perform the conversion:
bool(uw.x & 1)
Hope that helps, Pete