mesa: Filter glGetProgramiv pnames based on available extensions
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 25 Jul 2012 03:06:25 +0000 (20:06 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 24 Aug 2012 16:06:31 +0000 (09:06 -0700)
commit1a200b68cd57e2aee419e45ac8f1ce32e5cf8951
treeb1d0efef80678ed04ec92d77db370bc3a099217e
parent9282ebbaa5fdb4bc1d6234d746acac525660185d
mesa: Filter glGetProgramiv pnames based on available extensions

Previously you could always glGetProgramiv one of the transform feedback
or geometry shader enums even if the extension wasn't supported.

In addtion, this reverts part of bda6ad27.  I think the hunks involving
GL_PROGRAM_BINARY_LENGTH_OES were spurious.  Mesa has no support for any
other part of GL_OES_get_program_binary.

v2: Remove redundant return in get_programiv based on review feedback
from Matt Turner.

v3: Correctly handle UBO related enums.

v4: Emit the bad enum in the _mesa_error call based on review feedback
from Brian Paul.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/shaderapi.c