projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: fix texture border handling for cube arrays
[mesa.git]
/
src
/
mesa
/
main
/
clear.c
diff --git
a/src/mesa/main/clear.c
b/src/mesa/main/clear.c
index f0b525fa017fa47213e3362f62eae5ab21930692..077c5fca3b75211a7071f8894db0273cd32ccbf7 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++) {
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;
+ }
}
}
}
}
@@
-274,7
+278,7
@@
make_color_buffer_mask(struct gl_context *ctx, GLint drawbuffer)
break;
default:
{
break;
default:
{
- GL
u
int buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[drawbuffer];
+ GLint buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[drawbuffer];
if (buf >= 0 && att[buf].Renderbuffer) {
mask |= 1 << buf;
if (buf >= 0 && att[buf].Renderbuffer) {
mask |= 1 << buf;