aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_clear.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-07 13:28:57 +0000
committermarha <marha@users.sourceforge.net>2010-03-07 13:28:57 +0000
commit14b1cb8d5a27ec9716d3f790fce95f0469e35605 (patch)
tree6c94dc9f37b19b995bec603141442b1b93e8c9d2 /mesalib/src/mesa/swrast/s_clear.c
parent93c85587c691f9b91e7c2d8bda50f453e0f6674d (diff)
downloadvcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.tar.gz
vcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.tar.bz2
vcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.zip
Updated to Mesa 7.7
Diffstat (limited to 'mesalib/src/mesa/swrast/s_clear.c')
-rw-r--r--mesalib/src/mesa/swrast/s_clear.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mesalib/src/mesa/swrast/s_clear.c b/mesalib/src/mesa/swrast/s_clear.c
index 35080fd39..002718ded 100644
--- a/mesalib/src/mesa/swrast/s_clear.c
+++ b/mesalib/src/mesa/swrast/s_clear.c
@@ -24,6 +24,7 @@
#include "main/glheader.h"
#include "main/colormac.h"
+#include "main/formats.h"
#include "main/macros.h"
#include "main/imports.h"
#include "main/mtypes.h"
@@ -211,9 +212,6 @@ clear_ci_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
ASSERT(!ctx->Visual.rgbMode);
- ASSERT((ctx->Color.IndexMask & ((1 << rb->IndexBits) - 1))
- == (GLuint) ((1 << rb->IndexBits) - 1));
-
ASSERT(rb->PutMonoRow);
/* setup clear value */
@@ -264,8 +262,8 @@ clear_color_buffers(GLcontext *ctx)
}
else {
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
- const GLuint indexBits = (1 << rb->IndexBits) - 1;
- if ((ctx->Color.IndexMask & indexBits) == indexBits) {
+ const GLuint indexMask = (1 << _mesa_get_format_bits(rb->Format, GL_INDEX_BITS)) - 1;
+ if ((ctx->Color.IndexMask & indexMask) == indexMask) {
masking = GL_FALSE;
}
else {