56.72 drivers work

this may be 3 days too late, but the nvidia 56.72 drivers are out and using the registry hack to enable the glslang support, i got the 3d labs brick and particle shaders working as well as the humus’ volume lighting demo displaying the flames properly.

Which hack did you use?

This one
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=11;t=000051
didn’t worked for me…

2Corrail
latest nvemulate(with GLSL support) works well on 56.72(but it is still early implementation)…

2seed

i can’t get working particle demo. it writes “No such uniform named “Time””

yeah, i did use the same hack as the one from that link. the particle demo is giving me some kind of an illegal operation, but it does display some random noise on a quad. maybe it is not fully working at this stage…don’t have an ati card to test it on, only nvidia here and at work.

just had a look at the source and the error i am getting, and it is the uniform error for ‘Time’. my best bet is that the nvidia drivers do not have support for uniforms yet (i may be wrong)

Originally posted by seed:
my best bet is that the nvidia drivers do not have support for uniforms yet (i may be wrong)
The 56.72 drivers have support for uniforms and most of what was missing. It’s quite usable now. I do have one problem though. I can’t compile shaders without a main(). Has anyone tried this? No matter what I do in the shader, if there’s no main() I get a “no program defined” or sth. Note, this happens at compilation.

What I’m trying to do is put some flags in one shader and use them in another to conditionally use or not use parts of the second (at linking time of course).

Originally posted by spasi:
I do have one problem though. I can’t compile shaders without a main(). Has anyone tried this? No matter what I do in the shader, if there’s no main() I get a “no program defined” or sth. Note, this happens at compilation.

GLSlang shaders need the main() entry point. its in the specs :wink: .

THT

Originally posted by Chris Lux:
GLSlang shaders need the main() entry point. its in the specs :wink: .
If I remember correctly, the specs say that a shader -program- needs a main(). A shader -object- need not define a main(). Of course, as long as there is a main() in one of the shaders (of the same type) at linking time. Am I wrong?

Yes, you’re right, spasi.
There’s no need to define a main() in every shader object. But there HAVE to be a main() in a shader program. If not the link won’t be successful.

Originally posted by Corrail:
There’s no need to define a main() in every shader object.
OK, thanks for the confirmation.

Originally posted by Corrail:
But there HAVE to be a main() in a shader program. If not the link won’t be successful.
There is a main() when I link, but the problem is not there anyway. The error occurs when compiling the shader without a main(). I guess it’s a driver bug, I’m just wondering if anyone has done it successfully before. With newer drivers or on ATI hardware maybe?

I got a program with multiple shader “files” to work in the ShaderDesigner on ATI.
Don’t know about NVIDIA.
Concerning your idea with the flags: GLSL handles multiple shaders much like you would expect from C.
So you still need to define the function prototypes you are going to use in the beginning of your file that calls them. Just the implementation gets moved out.
Defining flags probably won’t work because of this.
Also, the bug might be that shader-files without any function at all are not compiling because as said above, it doesn’t make sense to have them.

Jan

There is a main() when I link, but the problem is not there anyway. The error occurs when compiling the shader without a main(). I guess it’s a driver bug, I’m just wondering if anyone has done it successfully before. With newer drivers or on ATI hardware maybe?

I successfully tested this on Catalyst 4.2 (thought that it was 4.2):

Vertex Shader 1:

vec4 my_transform()
{
   return gl_ModelViewProjectionMatrix * gl_Vertex;
}

Vertex Shader 2:

vec4 my_transform();

void main()
{
   gl_Position = my_transform();
}

2Corrail
latest nvemulate(with GLSL support) works well on 56.72(but it is still early implementation)…

Where do I get nvemulate?

If you’re a registered developer, you can get driver version 57.10, NVemulate and a small GLSL SDK with a few demos, all from http://developer.nvidia.com . I’ll be releasing a GLSL demo later this week that was developed on these drivers, and they seem to work really well.

– Tom

Thanks, I’ll contact nVidia.

Did they fix the problem with generic attribute binding and vertex arrays/VBOs?

Originally posted by jeickmann:
Concerning your idea with the flags: GLSL handles multiple shaders much like you would expect from C.
So you still need to define the function prototypes you are going to use in the beginning of your file that calls them. Just the implementation gets moved out.
Defining flags probably won’t work because of this.

The following should work OK, right?

Shader 1:

bool isSpecularEnabled() {
    return true; // or false, depending on the settings
}

Shader 2:

bool isSpecularEnabled();

void main() {
    // Handle diffuse here.

    if ( isSpecularEnabled() ) {
       // Handle specular here.
    }
}

Anyway, the 56.72 drivers don’t compile anything without a main(), even with functions defined, like the above examples.

Jep, this should work. It seems that this feature isn’t supported yet by NVs driver. Send them a mail at glsl-support@nvidia.com

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