diff options
author | Brian <[email protected]> | 2007-10-22 17:50:00 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-22 17:50:00 -0600 |
commit | 588c91eb0a93bdb1ae2819db63b081c9d78833d1 (patch) | |
tree | 0c339c632dc9521456b71287b5df21f8045e7e48 /src/mesa/drivers/x11 | |
parent | 455a08d87d6f838a92bb9260c9f27757e3740593 (diff) |
don't apply ColorMask to main gc
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 13 |
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 |