View Full Version : AMD glLinkProgram crash

02-10-2013, 10:00 PM
Just for general information. I caused the AMD driver to crash in glLinkProgram with the following code

vec4 Tuflow_Frag(vec2 p_ST, vec4 p_Colour)
ivec2 st = ivec2(floor(p_ST.st));
// fetch results colour
vec4 tuflow_colour = texelFetch(u_Tuflow_Texture,st,0);
// blend with background colour
if (tuflow_colour.xyz == vec3(0,0,0))
tuflow_colour = p_Colour;
tuflow_colour.xyz = mix(p_Colour.xyz,tuflow_colour.xyz,p_Colour.w);
tuflow_colour.w = p_Colour.w;

return tuflow_colour;

if (st.x < 0)
return vec4(1,0,0,1);
else if (st.x < 1)
return vec4(0,p_ST.s,0,1);
else if (st.x < 2)
return vec4(0,0,1,1);
return vec4(1,1,1,1);

The problem was resolved by removing the un-used code after the first return statement.