View Full Version : Vertex Attribute Aliasing on ATI

07-29-2005, 06:52 PM
Hi everybody,

I'm a little confused right now. I've been working on switching my system to using glVertexAttrib* (either immediate mode in DLists or VBOs). I'm currently just running the fixed function pipeline, not a shader.

On nVidia that works fine, but on ATI it seems like only the position is used, the other arguments are just ignored. I've just gone through the GL_ARB_vertex_program spec, and I'm not sure I really understand how that applies to my case.

I know that there issues to be expected when mixing classical and generic attributes, but I'm not doing that, everything is generic. In that case I would expect everything to alias nicely into the classical attributes and therefore just work for the fixed function pipeline. If that is not the case, why does it work for the position but for nothing else? Or is that covered by saying the aliasing behaviour is just undefined?

Can anybody enlighten me? Am I barking at a bug in ATI's driver (1.3.5140 (X4.3.0-8.14.13) on Fedora Core 4)? Is there any way to enable/control this behaviour?

Because I'm putting this stuff into display lists that can be shared between objects with different materials, switching between classic and attribute rendering will be very difficult to do. Not to talk about completely killing the nice separation of state and geometry I have right now, and that I would really like to keep.



07-30-2005, 12:14 AM
there used to be a bug using vertexattrib in displaylists with ATI, I reported that like a half year ago, havent checked since if its still in. (that was win32 driver so)

07-30-2005, 12:50 AM
The aliasing is not something you can rely on. It only says you mustn't use generic attribute X and classical attribute Y at the same time. If you use generic X, classical Y will be undefined and the other way round.

From the spec:

Implementations may, but do not necessarily, use the same storage for the
current values of generic and certain conventional vertex attributes.
When any generic vertex attribute other than zero is specified, the
current values for the corresponding conventional attribute in Table X.1
become undefined. Additionally, when a conventional vertex attribute is
specified, the current values for the corresponding generic vertex
attribute in Table X.1 become undefined. For example, setting the current
normal will leave generic vertex attribute 2 undefined, and vice versa.
When using the fixed function pipe, you should use the classical attributes. You can use the classical attributes when you use a shader, too, as long as the shader doesn't need more input as the fixed function pipe. If it needs more input, you have to change the vertex submitting code anyway...

Attribute 0 is a special case. It is guaranteed to be the same as the vertex position.