OSDN Git Service

main: Fix target checking for CopyTexSubImage*D.
authorLaura Ekstrand <laura@jlekstrand.net>
Wed, 25 Feb 2015 23:45:47 +0000 (15:45 -0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 7 Mar 2015 18:13:19 +0000 (18:13 +0000)
commit0cd8e357e323f39603bfb178108d94f83d6a3c37
tree34a9d7c74bec23016edf4ae402a171c82485fc44
parent8b4db9c6877fab9ed37a7377fe6592ff76828555
main: Fix target checking for CopyTexSubImage*D.

This fixes a dEQP test failure.  In the test,
glCopyTexSubImage2D was called with target = 0 and failed to throw
INVALID ENUM. This failure was caused by _mesa_get_current_tex_object(ctx,
target) being called before the target checking.  To remedy this, target
checking was separated from the main error-checking function and
called prior to _mesa_get_current_tex_object.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89312

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit ca65764d6042d2ea220a1e3952490f79c226f3e0)
src/mesa/main/teximage.c