mesa: Also update the color draw buffer if it's explicitly set to GL_NONE.

NOTE: This is a candidate for the 7.10 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
(cherry picked from commit 158d42c8b0)
This commit is contained in:
Henri Verbeet 2011-04-07 23:48:28 +02:00 committed by Ian Romanick
parent 10bf7aeeeb
commit 9e5da5894d

View file

@ -406,7 +406,6 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
fb->_ColorDrawBufferIndexes[buf] = bufIndex;
newState = GL_TRUE;
}
fb->ColorDrawBuffer[buf] = buffers[buf];
count = buf + 1;
}
else {
@ -415,6 +414,7 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
newState = GL_TRUE;
}
}
fb->ColorDrawBuffer[buf] = buffers[buf];
}
/* set remaining outputs to -1 (GL_NONE) */
while (buf < ctx->Const.MaxDrawBuffers) {