ATI & FORWARD_COMPATIBLE context

I’ve started to teach myself “modern” (read: 3.0+) OpenGL at the moment, so I wrote a small program only using non-deprecated features:

  • using gen<Whatever> for object names
  • vertice an colours interleaved in an vbo
  • vertex and fragment shaders using glsl v1.30 (not using any deprecated build-in variables)

And then I got stuck with a problem I wasn’t able to find anything about in the spec.

The mini-program ran fine on ubuntu 8.10 with Catalyst 9.2 on x86_64, at least as long as I don’t create an FORWARD_COMPATIBLE context. If I created a forward compatible context, glBindBuffer() (and the following glBufferData()) failed with an GL_INVALID_OPERATION error.
I couldn’t find a way to make it work.

Today I upgraded to ubuntu 9.04 beta, which (according to Linux Magazin) comes with an pre-release of Catalyst 9.4 (version 6.800 as opposed to Catalyst 9.3 which comes with version 6.593).
With this driver, the GL_INVALID_OPERATION error occured later on in my program on the two calls to glVertexAttribPointer().
I was able to work around this error by moving the corresponding glEnableVertexAttribArray() call before the call to glVertexAttribPointer().
It is remarkable, that it’s sufficient to have one call to glEnableVertexAttribArray() before the first call to glVertexAttribPointer(), the second call no longer cause an error, even if preceding it’s corresponding glEnableVertexAttribArray() call !

I suppose this is a quirk in the ATI driver, or am I missing something in the spec which should have told me to enable vertex attribute arrays before specifying their pointer ?

It’s more likely a quirk. Ati seem to be using a different driver path for forward-compatible compared to full contexts and it doesn’t seem very stable at the moment.

These quirks will probably be fixed sooner or later.

I just spent hours finding the bug that segfaulted my small OpenGL 3.0 program… to find out in the end that I had exactly the same problem you described. Only I use the official Catalyst 9.4 release (not the preview one) and doing the glEnableVertexAttribArray() call doesn’t help for me.

One other thing: if I don’t use a forward compatible context, the glsl shader language version shows up as 120 instead of 130 (according to glGetString with GL_SHADING_LANGUAGE_VERSION). My shader programs with `#version 130’ and using in / out qualifiers work fine though.

Perhaps the bug is part of glsl version 1.30?
Did anybody already commit this bug to the ati driver devs?

>> One other thing: if I don’t use a forward compatible context, the glsl shader language version shows up as 120 instead of 130 (according to glGetString with GL_SHADING_LANGUAGE_VERSION).

Now that you mention it I don’t think it’s specified how GLSL and core GL versions should pair. Theoretically I suppose you could have an implementation with a core GL verion of 10.0 and a GLSL version of 2.0 (if say you were trying to dissuade perspective buyers from trying your product).

Version 9.5 of the Linux catalyst driver still contains the same bug. However when using a non-forward compatible context the GLSL version is now correctly reported as 1.30 (instead of 1.20 with the previous driver).

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