PDA

View Full Version : AMD: The craziest bug I have even seen! Oo



Groovounet
02-22-2011, 06:49 AM
Two slices of code that I believe to be more or less identical...

Code A:


void main()
{
float Lod = textureQueryLod(Diffuse, Vert.Texcoord).y;

FragColor = test(Diffuse, Vert.Texcoord, max(Lod, 0.0));
}


Code B:


void main()
{
float Lod = max(textureQueryLod(Diffuse, Vert.Texcoord).y, 0.0);

FragColor = test(Diffuse, Vert.Texcoord, Lod);
}


Seriously, am I crazy? is this the demonstration that I slept too less for the pass 10 years or have I reached critical quantity of Tea? Because looking at these 2 pieces of code I expect the same result.

Because in practice the result are not at all the same! Code A behave as I expected it (Lod can't be negative) will B behave extract how I don't want it, Lod can't be positive.

I need a nap...

Groovounet
02-22-2011, 07:01 AM
If this is a really a bug... and I now really think it is, the content of "test" actually mater to reproduce the bug. I'll have to wrote a sample for it.

fred_em
02-22-2011, 07:13 AM
Please do let us know if you think this is indeed a bug.

Personally I have seen very serious bugs with AMD hardware and their GLSL compiler.

glfreak
02-22-2011, 02:45 PM
That's one reason I'm sticking to Direct3D for now and for ever, to avoid the hard time wasted on figuring out "is it me or the driver?"

frank li
02-22-2011, 08:06 PM
It's a driver bug and will be fixed soon.

Groovounet
02-23-2011, 04:31 AM
Thanks!