From 7296636ad03f58c7b7f673109515c1659a36a899 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 21 Jan 2009 16:28:38 -0700 Subject: 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. --- src/mesa/main/framebuffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/framebuffer.c') diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 079f457503f..2d7e3b05038 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 -- cgit v1.2.3