diff options
author | Brian Paul <[email protected]> | 2006-04-25 22:55:19 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-04-25 22:55:19 +0000 |
commit | 9c4fd26bcab7e4a5bd97a56deff89b8ea0ae5f1d (patch) | |
tree | 94abae129c42a19631325572ab53e066e74fb6d4 /src/mesa/swrast/s_buffers.c | |
parent | 2486267dda524b612879386aa5cea2bef98602ff (diff) |
update some tests for visual bit depths to use renderbuffers
Diffstat (limited to 'src/mesa/swrast/s_buffers.c')
-rw-r--r-- | src/mesa/swrast/s_buffers.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c index 9dace65860a..57f23ee829b 100644 --- a/src/mesa/swrast/s_buffers.c +++ b/src/mesa/swrast/s_buffers.c @@ -169,8 +169,8 @@ clear_ci_buffer(GLcontext *ctx, struct gl_renderbuffer *rb) ASSERT(!ctx->Visual.rgbMode); - ASSERT((ctx->Color.IndexMask & ((1 << ctx->Visual.indexBits) - 1)) - == (GLuint) ((1 << ctx->Visual.indexBits) - 1)); + ASSERT((ctx->Color.IndexMask & ((1 << rb->IndexBits) - 1)) + == (GLuint) ((1 << rb->IndexBits) - 1)); ASSERT(rb->PutMonoRow); @@ -221,7 +221,8 @@ clear_color_buffers(GLcontext *ctx) } } else { - const GLuint indexBits = (1 << ctx->Visual.indexBits) - 1; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0]; + const GLuint indexBits = (1 << rb->IndexBits) - 1; if ((ctx->Color.IndexMask & indexBits) == indexBits) { masking = GL_FALSE; } |