DSA on core profile contexts under nVidia

Hi,

I’ve been experiencing a strange issue with DSA on core profile contexts under nVidia driver. Specifically, the following code snippet is giving me headaches:

glGenVertexArrays(1, &vao);
//glBindVertexArray(vao);

glGenBuffers(3, buffers);

//glBindBuffer(GL_ARRAY_BUFFER, buffers[0]);
glNamedBufferDataEXT(buffers[0], sizeof (vertices), vertices, GL_STATIC_DRAW);
glVertexArrayVertexAttribOffsetEXT(vao, buffers[0], position_loc, 4, GL_FLOAT, 0, 0, 0);
glEnableVertexArrayAttribEXT(vao, position_loc);

When I run this, the glVertexArrayVertexAttribOffsetEXT call fails with GL_INVALID_OPERATION. I looked into the DSA spec for this and the only relevant information I could find is:

“However these commands fail and an INVALID_OPERATION error is generated if vaobj is not a name returned from a previous call to GenVertexArrays, or if such a name has since been deleted with DeleteVertexArrays.”

Clearly, this doesn’t apply here. Now begins the strange behavior. If I switch to a compatibility profile context (GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB) instead of a core one (GLX_CONTEXT_CORE_PROFILE_BIT_ARB), the GL_INVALID_OPERATION error is not triggered anymore. Back to a core profile context, if I uncomment both the glBindVertexArray and the glBindBuffer calls, it also works correctly. This leave me completely puzzled.

I’m running this on:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 9800 GTX/9800 GTX+/PCI/SSE2
OpenGL version string: 3.3.0 NVIDIA 280.13
OS: Fedora 15 x64

As a final word, though the DSA extension certainly is a good thing, I find it is lacking in some areas. For instance, there is no way to bind an index buffer to a vertex array object with DSA which limit their purpose to a certain degree.

this is a known bug in the r280 drivers. the OpenGL 4.2 beta driver 280.36 allready fixes this issue.

That was it! Thanks! =D