View Full Version : Bug in nvidia GLSL implementation?
06-15-2005, 10:08 AM
I have used
uniform float blah = 1.0;
which is wrong. My fault but the nvidia driver compiled without to complain and with the default value of 0.0. This is really annoying. Is there a reason why I can't set the default value of a uniform? I can write varyings in the FS too which is AFAIK really againt the spec.
PS how long can be a VS on a nv40? 512 or 2^16 instructions?
PPS I use version 76.64 under linux
06-15-2005, 11:28 AM
I think the reason it allows it (in linux, i use the same driver) is because it's really the Cg compiler under the hood, and it allows these sorts of things. In windows there is a way I believe, to turn on 'strict' compilation of GLSL shaders, making the compiler conform to the GLSL specs. I dunno if there is a way to do this in linux. I wish there was :) As well as the "write program object assembly" option.
06-15-2005, 01:13 PM
Fenris is partially correct, there is a way to turn on 'strict' compilation using nvidia drivers in Windows. This does not, however, prevent the shader from compiling. It gives mostly ambiguous warning messages that may leave you scratching your head. If you want to check a shader to see if it is compliant to the GLSL specification, you should run your shader through GLSL Validate (http://developer.3dlabs.com/downloads/glslvalidate/index.htm) . This little application has a specification conformant compiler front end with a nice, simple GUI wrapped around it. You simply feed it a shader and it will tell you if it is syntactically correct or not. You do not need OpenGL drivers, or even a video card with GLSL support to use this utility.
There are a couple of developer tools that you may also appreciate. Shader Designer (http://www.typhoonlabs.com) integrates GLSL Validate (http://developer.3dlabs.com/downloads/glslvalidate/index.htm) into its shader development environment and GLIntercept (http://glintercept.nutty.org) integrates it into its OpenGL Shading Language debugging software.
06-16-2005, 12:01 AM
Thanks for the help. I use the Shader Compiler Frontend from 3Dlabs under Linux which is great. The other tools are not (freely) available. I would like have something like the ogldebug under IRIX but Linux is still second class in this area. I use bugle but it's not working every time.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.