mesa: simplify _mesa_IsVertexArray()
_mesa_lookup_vao() already returns NULL if id is zero. v2: - change the conditional (Ian) Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> (v1)
This commit is contained in:
@@ -605,14 +605,9 @@ _mesa_IsVertexArray( GLuint id )
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
|
||||
if (id == 0)
|
||||
return GL_FALSE;
|
||||
|
||||
obj = _mesa_lookup_vao(ctx, id);
|
||||
if (obj == NULL)
|
||||
return GL_FALSE;
|
||||
|
||||
return obj->EverBound;
|
||||
return obj != NULL && obj->EverBound;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user