mesa: don't call valid_texture_object() in non-debug builds

This reverts commit c32bac57ed
and silences the warning differently.

The _mesa_reference_texobj() function is called quite a bit and
we don't want to call valid_texture_object() all the time in non-
debug builds.
This commit is contained in:
Brian Paul
2010-09-20 08:19:08 -06:00
parent e053d62aa5
commit 5522887842
+2 -5
View File
@@ -330,11 +330,8 @@ _mesa_reference_texobj(struct gl_texture_object **ptr,
GLboolean deleteFlag = GL_FALSE;
struct gl_texture_object *oldTex = *ptr;
{
GLboolean valid = valid_texture_object(oldTex);
ASSERT(valid);
(void) valid;
}
ASSERT(valid_texture_object(oldTex));
(void) valid_texture_object; /* silence warning in release builds */
_glthread_LOCK_MUTEX(oldTex->Mutex);
ASSERT(oldTex->RefCount > 0);