Nvidia bug with conventional attributes and uniforms


there seem to be a nvidia driver bug regarding the conventional “gl_…” attributes and uniforms. They are not not listed with glGetActiveAttribARB and glGetUniformAttribARB. According to the ARB spec they should be listed and it works without problems on ATI cards.

Is this some kind of nvidia “improvement” which can be switched off, or just a bug?
If this is an extenion how can it be switched off? I only know the registry hack to enable shaders, is there a registry hack to enforce strict standard conformance?

Please explain more.
There is no glGetUniformAttribARB. You meant glGetActiveUniformARB?
What was the shader, what the result and your expectation when using glGetActiveAttribARB and glGetActiveUniformARB?

yes, I meant glGetActiveUniformARB.

The problem is that built in uniforms and attributes like gl_Vertex, gl_ModelViewProjectionMatrix and all the other gl_* attributes/uniforms are not listed with a glGetActive*ARB. If I use only built in uniforms and attributes glGetObjectParameter with GL_OBJECT_ACTIVE_UNIFORMS_ARB or GL_OBJECT_ACTIVE_ATTRIBUTES_ARB returns 0. If I use a combination of generic and built in attribute/uniforms only the generic are listed.

This is independent from the shader.

Well, and I would have expected that it work like specified in the ARB specification that all active attributes and uniforms no matter if generic or built-in were listed.

i can confirm this bug on my quadro fx 500 running 61.12 drivers. built-in active uniform variables are not listed.

I’m having the same problem with 61.06 (Linux) on Quadro FX 500 and 1100 cards.

Does the spec say that the driver “must” return used built-in state variables? The orange book states that glGetActiveUniform “may” return built-in state uniforms while the ARB_shader_objects specs states, “The returned uniform name CAN be the name of built-in uniform state as well.” In any case, I hope nVidia decides to start returning the built-in uniform variables.

On a side note, the type and size returned from glGetActiveUniform in the nVidia driver seems wrong. For instance:

uniform vec3 Light;

returns a type of 1766 (which isn’t even a type) and a size of 3. I would expect the type to be GL_FLOAT_VEC3_ARB and the size to be 1. It’s not really a problem in my case, just an annoyance. Is anyone else experiencing similar behaviour with the nVidia driver?


Well, on ATI hardware built-in uniforms/attributes are listed.
And the query commands wouldn’t make any sense if built-in attributes/uniforms are not listed.
No data driven design would be possibly because you would have to scan the shader by “hand” for required parameters, set ALL available GL states or hardcode your state setting depending on your shader.
I think the “can” refers to: the returned name can be name of generic or built-in. Not: built-in attribute/uniform names can but need not be listed, besides this wouldn’t be any kind specification :slight_smile:

Originally posted by valoh:

Is this some kind of nvidia “improvement” which can be switched off, or just a bug?

This is just a bug. I apologize for the issue.

Look for it to be fixed in a future driver release.

I hope this helps.

  • Mark

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