projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e549dd
)
mesa: handle GL_NONE draw buffers correctly in glClear
author
Marek Olšák
<marek.olsak@amd.com>
Wed, 8 Jan 2014 00:23:43 +0000
(
01:23
+0100)
committer
Marek Olšák
<marek.olsak@amd.com>
Mon, 13 Jan 2014 14:48:07 +0000
(15:48 +0100)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/clear.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/clear.c
b/src/mesa/main/clear.c
index f0b525fa017fa47213e3362f62eae5ab21930692..fd5bb35b95734a53b0c9c1a849e66a8be7aa2dd9 100644
(file)
--- a/
src/mesa/main/clear.c
+++ b/
src/mesa/main/clear.c
@@
-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;
+ }
}
}