mesa: Allow NULL read/draw in complete FBOs in ARB_ES2_compatibility.
authorEric Anholt <eric@anholt.net>
Wed, 25 May 2011 20:51:26 +0000 (13:51 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 26 May 2011 15:54:29 +0000 (08:54 -0700)
From the ARB_ES2_compatibility spec:

    "(8) How should we handle draw buffer completeness?

    RESOLVED: Remove draw/readbuffer completeness checks, and treat
    drawbuffers referring to missing attachments as if they were NONE."

Fixes arb_es2_compatibility-drawbuffers when the short-circuit for
ARB_ES2_compatibility in the previous commit is dropped.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/fbobject.c

index 67df53b889cc3de6666947b87c0700fa57ecd911..739d03e931d84c1f8353753799893dc64bf77a21 100644 (file)
@@ -795,7 +795,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
    }
 
 #if FEATURE_GL
-   if (ctx->API == API_OPENGL) {
+   if (ctx->API == API_OPENGL && !ctx->Extensions.ARB_ES2_compatibility) {
       /* Check that all DrawBuffers are present */
       for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
         if (fb->ColorDrawBuffer[j] != GL_NONE) {