cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

florianlink
Journeyman III

ATI OpenGL GLSL driver error

Two years ago I encountered the following problem:

http://devgurus.amd.com/thread/152033

Now it reappeared in a slightly different manner: The following OpenGL fragment shader leads to a link error (with any trivial vertex shader):

struct VolumeInfo { sampler3D volumeDataTexture; vec4 data; };

uniform VolumeInfo primaryVolumeInfo;

//pre-declare the functions, this seems to cause the driver bug

vec4 someCall1(in VolumeInfo info);

vec4 someCall2(in VolumeInfo info);

vec4 someCall2(in VolumeInfo info)

{ return vec4(info.data); }

vec4 someCall(in VolumeInfo info)

{ return someCall2(info); }

void main()

{ gl_FragColor = someCall(primaryVolumeInfo); }

The problem seams to be the pre-declaration of someCall1/someCall2, if I uncomment them, the code works as expected.

It only happens when a samples is part of the uniform struct and when the struct is passed through two method calls and

if the method calls are pre-declared.

I get the following errors:

Vertex shader(s) failed to link, fragment

shader(s) failed to link.

Vertex link error: INVALID_OPERATION.

unexpected error.

fragment link error: INVALID_OPERATION.

unexpected error.

0 Likes
0 Replies