Does your graphics card drivers parse glsl correctly ?

Go to this site and install the parser validator tool.

http://developer.3dlabs.com/downloads/index.htm

My shity radeon 9600 has failed half the tests and some has even crashed miserably.

The opengl version reported is 2.0.5147

I guess it’s time to download new catalyst drivers and see if the results are better.

49%, GeForce 6600GT :o

Radeon 9700 Pro failed only 4 tests.
98%.

Did you try the v1.5 tests to see if you get better results?

The low scores on NV hardware come from a lot of shaders containing invalid GLSL, that nonetheless compile fine with the Cg compiler, internally used by the NV driver. ATI’s implementation is much more spec compliant, hence the high scores.

It’s a nice tool, but these scores don’t say anything about the driver’s ability to produce programs that are runnable by the hardware. :wink:

well, shame on nVidia then - if the code doesn’t confrom to specs, nV should complain. Otherwise we end up with the same situation that exists in webdevelopment where IE will happily render invalid html.

That made me burst into laughter. :smiley:
The last part("[…]happily render invalid html") for some reason seems hilarious.

Yes, it’s kind of dangerous to rely on the NV compiler. When GLSL came out, many developers found their shaders failing on ATI hardware, it’s very easy to write nonconformant code. Then NV Emulate added a nice “Strict Shader Portability Warnings” option, that forces the compiler to report any conformance issues. It works great and I never had any problems after that.

Besides, being able to write Cg stuff inside GLSL is almost critical for us, especially when you need to use half fp types to keep the crappy GeFX line of cards running decently. It’s quickly getting rather ugly though:


#ifndef __GLSL_CG_DATA_TYPES
	#define half float
	#define half2 vec2
	#define half3 vec3
	#define half4 vec4

	#define half3x3 mat3

	#define h4tex2D texture2D
#endif

...

#ifndef __GLSL_CG_DATA_TYPES
	void main(void)
#else
	half4 main(void) : COLOR
#endif
{

....

	#ifndef __GLSL_CG_DATA_TYPES
		gl_FragColor = colorOUT;
	#else
		return colorOUT;
	#endif
}