summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@gmail.com>2015-12-16 17:09:50 +0100
committerTimothy Arceri <timothy.arceri@collabora.com>2016-01-12 11:02:16 +1100
commit395b53dad69470f0f3014e96bed0e6ceef383ce8 (patch)
tree4ee04e16fe7fd25dd9e902794746d9dd16537164 /src/mesa/main/fbobject.c
parent2a15dc0dd5502ae7c585cacad497f032cab8c602 (diff)
downloadexternal_mesa3d-395b53dad69470f0f3014e96bed0e6ceef383ce8.zip
external_mesa3d-395b53dad69470f0f3014e96bed0e6ceef383ce8.tar.gz
external_mesa3d-395b53dad69470f0f3014e96bed0e6ceef383ce8.tar.bz2
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 <kusmabite@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index fe6bdc2..3be216d 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);
}