Hi everyone,
I recently stumbled upon a problem on <s>ATI</s> AMD Catalyst 9.4 + Radeon HD 2600.
My shaders use the ‘gl_Position = ftransform()’ construct, and only custom vertex attributes - passed using glVertexAttribPointer.
I have the following error :
Fragment shader(s) linked, vertex shader(s) failed to link.
If I replace ‘ftransform()’ to have ‘gl_Position = gl_ModelViewProjectionMatrix * my_vertex’, the error goes away.
If I stop using custom attributes, revert to glVertexPointer usage, and especially remove the call to ‘glBindAttribLocationARB( programID, 0, “my_vertex” )’, the error also goes away.
I could not find any clear indication in specs about using ‘ftransform()’ and custom attributes. Is it ‘legal’ behaviour ? I suppose so as the error is not explicit, and it works fine on NVidia (which is not a strong warrant about GLSL ‘legality’).
Does anyone have met this problem before ? Is there any know workaround (except for patching the shader) ?
Cheers,
Nicolas.
EDIT :: It seems that on simpler shaders, I can have ‘ftransform()’ work as expected on the same platform. It looks more and more like a driver bug to me.
EDIT :: The problem also exists with Catalyst 9.5 - the simpler shaders that reproduce the problem are :
attribute vec4 my_vertex;
varying vec4 vertex;
void main()
{
// this causes the error, if my_vertex is replaced by gl_Vertex, the error goes away
vertex = my_vertex;
gl_Position = ftransform();
}
void main()
{
gl_FragColor = vec4( 1.0 );
}