mesa: Add explicit target checking to GetTexLevelParameter[if]v().
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 11 Jun 2012 01:41:58 +0000 (18:41 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 17 Aug 2012 16:14:36 +0000 (09:14 -0700)
commit9e4fde85e46f406b37ad372487fbff4ed51c65e4
tree9b1e55e7646b142c137e4f8810f3cc610a773dd1
parent63396ce4c0fe067f69d1b53d0408627a421c4678
mesa: Add explicit target checking to GetTexLevelParameter[if]v().

Previously, it relied on _mesa_max_texture_levels() for texture target
error checking.  This was somewhat dodgy, as _mesa_max_texture_levels()
is called in seven diferent places, not all of which necessarily accept
the same list of targets.

I copied the list of legal targets from _mesa_max_texture_levels(), so
this patch should not introduce any change in behavior.  Future patches
will cause the two to diverge.

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