summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_dd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/x11/xm_dd.c')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 3e61342512d..3c576c7cd8b 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -245,7 +245,6 @@ clear_buffers(struct gl_context *ctx, GLbitfield buffers)
{
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
/* this is a window system framebuffer */
- const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask[0];
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaBuffer b = XMESA_BUFFER(ctx->DrawBuffer);
const GLint x = ctx->DrawBuffer->_Xmin;
@@ -264,7 +263,8 @@ clear_buffers(struct gl_context *ctx, GLbitfield buffers)
XMesaSetForeground(xmesa->display, b->cleargc, xmesa->clearpixel);
/* we can't handle color or index masking */
- if (*colorMask == 0xffffffff && ctx->Color.IndexMask == 0xffffffff) {
+ if (GET_COLORMASK(ctx->Color.ColorMask, 0) == 0xf &&
+ ctx->Color.IndexMask == 0xffffffff) {
if (buffers & BUFFER_BIT_FRONT_LEFT) {
/* clear front color buffer */
struct gl_renderbuffer *frontRb