View Full Version : Fragment shader does not compile on AMD Radeon

08-08-2013, 06:46 PM
I've been having trouble getting a fragment shader working on an AMD Radeon HD 6700 card using Catalyst 13.4 drivers under Win7 x64. Using the GPU ShaderAnalyzer application, I was able to narrow down the problem to the following fragment shader code:

varying vec3 viewDir;

struct LightData {
vec3 direction;
vec3 color;
float attenuation;

varying vec3 normalDir;

void main()

GPU ShaderAnalyzer gives the following error message:

Internal compilation failure: Possibly caused by GSA not supporting a GLSL feature used in shader.

ERROR: 0:7: error(#132) Syntax error: ';' parse error
ERROR: error(#273) 1 compilation errors. No code generated

If I move the declaration of the normalDir varying above the LightData struct definition, then the code compiles successfully. Is this a bug in the Catalyst driver, or is this invalid GLSL code?