ASSERT(dpy);
ASSERT(gc);
- if (drawBuffer && /* buffer != 0 means it's a Window or Pixmap */
+ if (ctx->Color.DrawBuffer == GL_FRONT &&
+ ctx->Pixel.ReadBuffer == GL_FRONT &&
+ drawBuffer && /* buffer != 0 means it's a Window or Pixmap */
readBuffer &&
type == GL_COLOR &&
(swrast->_RasterMask & ~CLIP_BIT) == 0 && /* no blend, z-test, etc */
ctx->Driver.DrawPixels = _swrast_DrawPixels;
ctx->Driver.CopyPixels = _swrast_CopyPixels;
#else
- ctx->Driver.CopyPixels = xmesa_CopyPixels;
+ ctx->Driver.CopyPixels = /*_swrast_CopyPixels;*/xmesa_CopyPixels;
if (xmesa->xm_visual->undithered_pf == PF_8R8G8B &&
xmesa->xm_visual->dithered_pf == PF_8R8G8B) {
ctx->Driver.DrawPixels = xmesa_DrawPixels_8R8G8B;
stepy = 1;
}
- overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
- ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
+ if (ctx->DrawBuffer == ctx->ReadBuffer) {
+ overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
+ ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
+ }
+ else {
+ overlapping = GL_FALSE;
+ }
if (ctx->Depth.Test)
_swrast_span_default_z(ctx, &span);
stepy = 1;
}
- overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
- ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
+ if (ctx->DrawBuffer == ctx->ReadBuffer) {
+ overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
+ ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
+ }
+ else {
+ overlapping = GL_FALSE;
+ }
if (ctx->Depth.Test)
_swrast_span_default_z(ctx, &span);
stepy = 1;
}
- overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
- ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
+ if (ctx->DrawBuffer == ctx->ReadBuffer) {
+ overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
+ ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
+ }
+ else {
+ overlapping = GL_FALSE;
+ }
_swrast_span_default_color(ctx, &span);
if (ctx->Fog.Enabled)
stepy = 1;
}
- overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
- ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
+ if (ctx->DrawBuffer == ctx->ReadBuffer) {
+ overlapping = regions_overlap(srcx, srcy, destx, desty, width, height,
+ ctx->Pixel.ZoomX, ctx->Pixel.ZoomY);
+ }
+ else {
+ overlapping = GL_FALSE;
+ }
if (overlapping) {
GLint ssy = sy;