|05-10-10, 01:52 PM||#1|
Join Date: Oct 2008
195.36.15: #version 110 is ignored.
With the driver shipped with Ubuntu 10.04 or arch (195.36.15), the following fragment shader code compiles when it should not:
vec2 location = gl_PointCoord - vec2(0.5, 0.5);
float length = dot(location, location);
if (length < 0.20)
gl_FragColor = gl_Color;
gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
By providing #version 110, we want to force the driver to be compliant with the GLSL specification and to reject anything above version 1.10. Notably gl_PointCoord is defined only in 1.20 and above in a fragment shader.
The point is to be able to develop under Linux (and detect the error under Linux as soon as possible and fix them) and to still have the same behavior as we get on Mac or on Windows.
There are at least 3 machines on which it happens:
The Ubuntu x86 machine is a nVidia GeForce 6800, 256MB. The Ubuntu x86_64 machine is a nVidia Quadro FX 3600M, 512MB. The arch x86_64 machine is an nVidia Quadro FX 580, 512MB.
I can provide more details if you want to.
The nVidia #version logic is describes in this old nVidia document (December 2006).
ref: developer.download.nvidia.com/opengl/glsl/glsl_release_notes.pdf, page 2:
"In addition to these new features, the Release 95 drivers also improve adherence to the
OpenGL specification. Whenever #version 110 or #version 120 is found at the beginning
of a shader, it is compiled such that items formerly flagged as portability warnings are
now marked as errors. This means that some shaders using #version 110 that did not
strictly conform to the OpenGL specification may no longer compile with theses drivers.
Shaders that do not specify #version 110 or #version 120 will continue to compile as
François Bertel, PhD | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
| Clifton Park NY 12065, USA
|05-19-10, 05:29 PM||#3|
Join Date: Feb 2010
Location: Santa Clara, CA
Re: 195.36.15: #version 110 is ignored.
Thanks for bringing this to our attention. We will perform better #version checking in a future version of the NVIDIA driver.