mesa: fix incorrect error in _mesa_BindTextureUnit()
authorBrian Paul <brianp@vmware.com>
Wed, 30 Sep 2015 17:48:07 +0000 (11:48 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 1 Oct 2015 13:45:43 +0000 (07:45 -0600)
commit1c6689bf03fe500cc1bc55d7c2039c0aa3ae095c
treec58eea3962b587070370cc4736746f7d067abc05
parenta9408f3ca14f2fb6286bd66bad06ee1bde0d8697
mesa: fix incorrect error in _mesa_BindTextureUnit()

If the texture object exists, but the Name field is zero, it means
the object was created but never bound to a target.  Trying to bind it
in _mesa_BindTextureUnit() should generate GL_INVALID_OPERATION.

Fixes piglit's arb_direct_state_access-bind-texture-unit test.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/texobj.c