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.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index f02b40bdc09..3ee44bfbaf6 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -163,7 +163,6 @@ index_mask( GLcontext *ctx, GLuint mask )
m = (unsigned long) mask;
}
XMesaSetPlaneMask( xmesa->display, xmbuf->cleargc, m );
- XMesaSetPlaneMask( xmesa->display, xmbuf->gc, m );
}
}
@@ -195,7 +194,6 @@ color_mask(GLcontext *ctx,
if (bmask) m |= GET_BLUEMASK(xmesa->xm_visual);
}
XMesaSetPlaneMask( xmesa->display, xmbuf->cleargc, m );
- XMesaSetPlaneMask( xmesa->display, xmbuf->gc, m );
}
}
@@ -454,13 +452,13 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
ctx->_ImageTransferState == 0 && /* no color tables, scale/bias, etc */
ctx->Pixel.ZoomX == 1.0 && /* no zooming */
ctx->Pixel.ZoomY == 1.0 &&
- xrb->pixmap &&
+ xrb->pixmap && /* drawing to pixmap or window */
xrb->St.Base.AlphaBits == 0)
{
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
XMesaDisplay *dpy = xmesa->xm_visual->display;
- const XMesaGC gc = xmbuf->gc;
+ const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
int dstX = x;
int dstY = y;
int w = width;
@@ -555,7 +553,7 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
const SWcontext *swrast = SWRAST_CONTEXT( ctx );
XMesaDisplay *dpy = xmesa->xm_visual->display;
XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
- const XMesaGC gc = xmbuf->gc;
+ const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
ASSERT(dpy);
ASSERT(gc);
@@ -564,7 +562,7 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
if (swrast->NewState)
_swrast_validate_derived( ctx );
- if (xrb->pixmap &&
+ if (xrb->pixmap && /* drawing to pixmap or window */
format == GL_RGB &&
type == GL_UNSIGNED_SHORT_5_6_5 &&
!ctx->Color.DitherFlag && /* no dithering */
@@ -655,7 +653,8 @@ xmesa_CopyPixels( GLcontext *ctx,
const XMesaContext xmesa = XMESA_CONTEXT(ctx);
const SWcontext *swrast = SWRAST_CONTEXT( ctx );
XMesaDisplay *dpy = xmesa->xm_visual->display;
- const XMesaGC gc = ((XMesaBuffer) ctx->DrawBuffer)->gc;
+ XMesaBuffer xmbuf = XMESA_BUFFER(ctx->DrawBuffer);
+ const XMesaGC gc = xmbuf->cleargc; /* effected by glColorMask */
struct xmesa_renderbuffer *srcXrb
= xmesa_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer->Wrapped);
struct xmesa_renderbuffer *dstXrb