NVIDIA pragma strict on

Is anyone using this pragma?

#pragma optionNV(strict on)

If so, do you know what kind of errors it catches that are not caught otherwise? It would be great if this made NVIDIA’s compiler as strict as ATI’s so we could have a bit more confidence that the shader will successfully compile on both.

Regards,
Patrick

IIRC, GLSL release notes from 2006 specify that nvidia extensions are only enabled by default when no #version specification is present in the file. Specifying #version 110 or higher automatically disables these. This is probably the equiv of flipping strict on, but only an NVidia driver guy can say for sure, which should disable the Cg std library (__GLSL_CG_STDLIB), Cg data types such as half (__GLSL_CG_DATA_TYPES), from-disk #include, etc.

Thanks! Good to know. Previously, I added this to my shaders that already had “#version 150” and wasn’t able to catch anything additional even if I hacked the shaders a little.

Regards,
Patrick

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