[Mesa-dev] [PATCH] mesa: Check FBO completeness in _mesa_valid_to_render() if it's unknown.

Kenneth Graunke kenneth at whitecape.org
Mon Nov 26 21:10:43 PST 2012


If _Status is 0, then we don't know whether the FBO is complete or not,
and need to recheck it.

This fixes oglconform's drawBuffers-blend/basic.state.index0 test.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/main/context.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 0508378..d0320d4 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1794,6 +1794,10 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
       }
    }
 
+   /* If we don't know the framebuffer status, update it now. */
+   if (ctx->DrawBuffer->_Status == 0)
+      _mesa_test_framebuffer_completeness(ctx, ctx->DrawBuffer);
+
    if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
       _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
                   "%s(incomplete framebuffer)", where);
-- 
1.8.0



More information about the mesa-dev mailing list