This fragment shader code compiles in Windows, but throws an error in OS X (Mountain Lion, using a 3.2 core context).
#version 150 core
in int vinstance_id;
uniform uint object_id[16];
out uint id_map;
void main() {
id_map = object_id[vinstance_id];
}
The error is:
ERROR: 0:2: int can't be an in in the fragment shader
I don’t think that’s right: In the GLSL 1.50 spec, section 4.3.4 says about fragment shaders:
Fragment inputs can only be signed and unsigned integers and integer vectors, float …
Is this a driver bug?
No, you didn’t read the spec thoroughly.
(Roughly in the middle of page 32 of linked document, if anyone wants to verify)