Module: Mesa Branch: master Commit: 4f00b2bc7e4515257ff9c674259da1264ab2c9a3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4f00b2bc7e4515257ff9c674259da1264ab2c9a3
Author: Samuel Pitoiset <[email protected]> Date: Tue Jun 20 15:13:15 2017 +0200 mesa: simplify _mesa_IsVertexArray() _mesa_lookup_vao() already returns NULL if id is zero. v2: - change the conditional (Ian) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]> (v1) --- src/mesa/main/arrayobj.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 82c00fbe82..17a789f4da 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -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; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
