mesa: fix target error checking in glGetTexLevelParameter
authorTapani Pälli <tapani.palli@intel.com>
Thu, 13 Aug 2015 14:03:44 +0000 (17:03 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 17 Aug 2015 07:02:52 +0000 (10:02 +0300)
commita7e6f8cc9f72fcf4eaef814eb50d53ccffd58730
treefd850e87fdd5742155dd24ccd6c4c02c18193fba
parent2f5ee9bf27b912726dea969a5e5159e1d6665f6c
mesa: fix target error checking in glGetTexLevelParameter

With non-dsa functions we need to do target error checking before
_mesa_get_current_tex_object which would just call _mesa_problem without
raising GL_INVALID_ENUM error. In other places of Mesa, target gets checked
before this call.

Fixes failures in:
   ES31-CTS.texture_storage_multisample.APIGLGetTexLevelParameterifv.*

v2: do the target check also for dsa functions (Timothy)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
src/mesa/main/texparam.c