mesa: Add explicit target checking to GetTexLevelParameter[if]v().
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 <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Reviewed-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>

tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,tokyovigilante/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,wolf96/glsl-optimizer,djreep81/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,bkaradzic/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,metora/MesaGLSLCompiler,zz85/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,metora/MesaGLSLCompiler,tokyovigilante/glsl-optimizer