AMD: The craziest bug I have even seen! Oo

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…

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.

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.

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?”

It’s a driver bug and will be fixed soon.

Thanks!

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