summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorJouk <joukj@tarantella.nano.tudelft.nl>2007-10-31 08:18:58 +0100
committerJouk <joukj@tarantella.nano.tudelft.nl>2007-10-31 08:18:58 +0100
commitd1414da8f9dbf3c27cf05509be51e8c70ed1185d (patch)
treeb6b3fdccea77d6173c1a829e0d2710d5b973dd5a /src/mesa/drivers/x11
parentb263435a98173645fa3f4a5dce4566e53470f38f (diff)
parentd2f19a554a9089fddb5e978e3a732bbf71d77f93 (diff)
Merge branch 'master' of git+ssh://joukj@git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'src/mesa/drivers/x11')
-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 c8546236fb..4c8bf5f656 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -159,7 +159,6 @@ index_mask( GLcontext *ctx, GLuint mask )
m = (unsigned long) mask;
}
XMesaSetPlaneMask( xmesa->display, xmbuf->cleargc, m );
- XMesaSetPlaneMask( xmesa->display, xmbuf->gc, m );
}
}
@@ -191,7 +190,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 );
}
}
@@ -450,13 +448,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->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;
@@ -551,7 +549,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);
@@ -560,7 +558,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 */
@@ -651,7 +649,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