mesa: handle GL_NONE draw buffers correctly in glClear

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Marek Olšák 2014-01-08 01:23:43 +01:00
parent 4e549ddb50
commit 9bf9578c1b

View file

@ -179,7 +179,11 @@ _mesa_Clear( GLbitfield mask )
if (mask & GL_COLOR_BUFFER_BIT) {
GLuint i;
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
bufferMask |= (1 << ctx->DrawBuffer->_ColorDrawBufferIndexes[i]);
GLint buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[i];
if (buf >= 0) {
bufferMask |= 1 << buf;
}
}
}