mesa: Support GL_TEXTURE_BUFFER in GetTexLevelParameter[if]v in GL 3.1+.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 11 Jun 2012 02:33:01 +0000 (19:33 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 17 Aug 2012 16:14:36 +0000 (09:14 -0700)
commit3df13b32e56dbc76bdc72b75ea1462f79b44dce9
treec4ce2ab56692a3ce7a349d583389ce2253b96d6d
parent8c37fc1e9240a323b07c21da83dbd5432fc6895a
mesa: Support GL_TEXTURE_BUFFER in GetTexLevelParameter[if]v in GL 3.1+.

The OpenGL 3.1 specification explicitly allows this.  Oddly, the
ARB_texture_buffer_object spec's issues section claims this isn't
allowed, but proceeds to explain that the extension simply doesn't edit
the underlying spec to allow it, and thus it didn't appear in the list
of legal texture targets.

Thus, this patch legalizes it only in 3.1+ contexts, but still returns
INVALID_ENUM in earlier contexts that expose ARB_texture_buffer_object.

Unfortunately, the behavior of the call is horrendously undefined.

Fixes oglconform's tbo/negative.textureParams test.

v2: Require desktop OpenGL.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/teximage.c
src/mesa/main/texparam.c