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);
}
}
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;
}
return; \
}
#define RENDER_SPAN( span ) \
- if (ctx->Visual.depthBits <= 16) { \
+ if (rb->DepthBits <= 16) { \
GLuint i; \
const GLushort *zRow = (const GLushort *) \
rb->GetPointer(ctx, rb, span.x, span.y); \
&& ctx->Depth.Mask == GL_TRUE)
|| swrast->_RasterMask == TEXTURE_BIT)
&& ctx->Polygon.StippleFlag == GL_FALSE
- && ctx->Visual.depthBits <= 16) {
+ && ctx->DrawBuffer->Visual.depthBits <= 16) {
if (swrast->_RasterMask == (DEPTH_BIT | TEXTURE_BIT)) {
USE(simple_z_textured_triangle);
}