ATI GLSL compiler bug

Is there some AMD mailing list for driver bug reports?

anyway, i found the following bug in their GLSL compiler:
this pixel shader

#version 330
out vec4 color0;
void main() {
    const float a = 13;
    float b = clamp(a, 0, 1);
    color0 = vec4(b);
}

outputs vec4(0,0,0,0) instead of vec4(1,1,1,1)

if the “const” qualifier is removed from the variable a, then it works normally. same goes to the “clamp” operation.
apparently the bug is with the const-folding of “clamp” when the first argument is variable with “const” qualifier.

Yes, this looks like a bug.
AMD devs used to hang out around this forum, but maybe you have better chances if you post this on the AMD developer forums.

I submitted this problem to our shader team.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.