diff options
author | Samuel Pitoiset <[email protected]> | 2017-06-20 15:13:15 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-20 19:15:17 +0200 |
commit | 4f00b2bc7e4515257ff9c674259da1264ab2c9a3 (patch) | |
tree | e860ce4386003bac805d03981f9133068943e1fe | |
parent | cb3e01ca7110069f5ffe9ef42df6511f650ec644 (diff) |
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)
-rw-r--r-- | src/mesa/main/arrayobj.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 82c00fbe826..17a789f4da4 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; } |