diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-06 18:05:36 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-07 00:48:01 +0200 |
commit | 783924308546c327046d9accefd97bc5e8a7b932 (patch) | |
tree | cd83c93691acac705cf66926e0ac55c26a6b76b8 /src | |
parent | 93d7014c1d522616eceac3addaebba17244cd353 (diff) |
mesa/main: simplify _mesa_IsRenderbuffer()
_mesa_lookup_renderbuffer() already checks if 'id' is non-zero.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/fbobject.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 5048327e5ed..3289f86803c 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1297,15 +1297,14 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, GLboolean GLAPIENTRY _mesa_IsRenderbuffer(GLuint renderbuffer) { + struct gl_renderbuffer *rb; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (renderbuffer) { - struct gl_renderbuffer *rb = - _mesa_lookup_renderbuffer(ctx, renderbuffer); - if (rb != NULL && rb != &DummyRenderbuffer) - return GL_TRUE; - } - return GL_FALSE; + + rb = _mesa_lookup_renderbuffer(ctx, renderbuffer); + return rb != NULL && rb != &DummyRenderbuffer; } |