summaryrefslogtreecommitdiff
path: root/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-01-21 16:28:38 -0700
committerBrian Paul <brianp@vmware.com>2009-01-22 15:21:17 -0700
commit7296636ad03f58c7b7f673109515c1659a36a899 (patch)
tree79fba69f01fb7919d11c44a0d4fafe91aacab3b7 /src/mesa/main/framebuffer.c
parentd0f13fa7d70c57e698cce9fbde399e80f7afcf47 (diff)
mesa: avoid calling _mesa_test_framebuffer_completeness() more than needed
When we change a FBO's attachments, set _Status=0. Before using an FBO, check if status != GL_FRAMEBUFFER_COMPLETE. Also, fix missing GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE status.
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r--src/mesa/main/framebuffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 079f457503..2d7e3b0503 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -793,8 +793,10 @@ update_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
/* This is a user-created framebuffer.
* Completeness only matters for user-created framebuffers.
*/
- _mesa_test_framebuffer_completeness(ctx, fb);
- _mesa_update_framebuffer_visual(fb);
+ if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) {
+ _mesa_test_framebuffer_completeness(ctx, fb);
+ _mesa_update_framebuffer_visual(fb);
+ }
}
/* Strictly speaking, we don't need to update the draw-state