gl_VertexID and *BaseVertex

What value should contain gl_VertexID then using *BaseVertex commands? Should it be index before or after applying BaseVertex offset?

There is a note here Built-in Variable (GLSL) - OpenGL Wiki :

Note: gl_VertexID​ will have the base vertex applied to it.

And another one here glDrawElementsBaseVertex - OpenGL 4 Reference Pages :

The gl_VertexID​ passed to the Vertex Shader will be the index after being offset by basevertex​, not the index fetched from the buffer.

And at least on AMD HD 5650 with latest drivers it works this way.
But on NVIDIA GeForce GTX 780 gl_VertexID equals to index directly from index buffer, before offsetting by BaseVertex.

Initially, I was thinking it’s NVIDIA driver bug. But after looking in the spec I was surprised by the fact that there is no clear answer which way it should be.

GLSL spec says just that:

The variable gl_VertexID is a vertex shader input variable that holds an integer index for the vertex, asdefined under “ShaderInputs” in section 2.11.7 “Varying Variables” in the OpenGL Graphics System
Specification. Whilethe variable gl_VertexID is always present, its value is not always defined.

And GL 3.3 spec:

gl_VertexID holds the integer index i implicitly passed by DrawArrays or
one of the other drawing commands defined in section 2.8.3.

And section 2.8.3 “Drawing Commands” didn’t say anything about which value should go into gl_VertexID.

(I’ve used 3.3 spec because I’m targeting 3.3, but latest 4.4 spec also didn’t cover this aspect.)

So who is buggy? Is it NVIDIA drivers? Or AMD drivers and GL wiki? Or maybe it is a bug in the specification and HW vendors can implement it any way they like?

Here is a small test app with source:http://www.faogen.com/files/base_vertex.zip

It should draw two rects, one red and one green if gl_VertexID include BaseVertex offset or two red rects if it comes directly from the index buffer. Both 32 and 64-bit versions included in case there is a difference between 32/64 bit drivers.

Read ARB_shader_draw_parameters.