summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-12-05 00:44:01 +0000
committerBrian Paul <[email protected]>2003-12-05 00:44:01 +0000
commita6ad01c14e8b7d819783d81c1febfa8e72063bf3 (patch)
tree375c1252106162279adb97aee86149b5ab21cc69 /src/mesa/swrast
parent15f7f4e31f1a90d58a4e897299039c9fd39782f9 (diff)
Fix a front/back CopyPixels glitch.
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_copypix.c36
1 files changed, 28 insertions, 8 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 15cedb4c1dd..0692adfbff9 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -310,8 +310,13 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
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);
@@ -521,8 +526,13 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
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);
@@ -636,8 +646,13 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
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)
@@ -736,8 +751,13 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
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;