From: Erik Faye-Lund Date: Wed, 16 Dec 2015 16:09:50 +0000 (+0100) Subject: main: get rid of needless conditional X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=395b53dad69470f0f3014e96bed0e6ceef383ce8;p=mesa.git main: get rid of needless conditional We already check if the driver changed the completeness, we don't need to duplicate that check. Let's just early out there instead. Signed-off-by: Erik Faye-Lund Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index fe6bdc2b4d1..3be216da234 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1253,23 +1253,22 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, ctx->Driver.ValidateFramebuffer(ctx, fb); if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { fbo_incomplete(ctx, "driver marked FBO as incomplete", -1); + return; } } - if (fb->_Status == GL_FRAMEBUFFER_COMPLETE_EXT) { - /* - * Note that if ARB_framebuffer_object is supported and the attached - * renderbuffers/textures are different sizes, the framebuffer - * width/height will be set to the smallest width/height. - */ - if (numImages != 0) { - fb->Width = minWidth; - fb->Height = minHeight; - } - - /* finally, update the visual info for the framebuffer */ - _mesa_update_framebuffer_visual(ctx, fb); + /* + * Note that if ARB_framebuffer_object is supported and the attached + * renderbuffers/textures are different sizes, the framebuffer + * width/height will be set to the smallest width/height. + */ + if (numImages != 0) { + fb->Width = minWidth; + fb->Height = minHeight; } + + /* finally, update the visual info for the framebuffer */ + _mesa_update_framebuffer_visual(ctx, fb); }