PDA

View Full Version : ATI GLSL compiler bug



l_belev
11-16-2011, 10:21 AM
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.

aqnuep
11-17-2011, 02:49 AM
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.

Hongwei Li
11-17-2011, 09:03 PM
I submitted this problem to our shader team.