summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2006-05-23 09:36:16 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2006-05-23 09:36:16 +0000
commitdb4b6fd759e2d8efc5025010fc161a59cc778dde (patch)
tree0d3e7009301f43ed304505fed35b324ad1fa92c0
parentdbb2f30ad3b83146b8473f95921170246f38cb4d (diff)
Copying overlapping rects works if they are in different buffers...
-rw-r--r--src/mesa/drivers/dri/i915/intel_pixel_copy.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_pixel_copy.c b/src/mesa/drivers/dri/i915/intel_pixel_copy.c
index d68b8608d8..6ba44fee11 100644
--- a/src/mesa/drivers/dri/i915/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/i915/intel_pixel_copy.c
@@ -99,23 +99,24 @@ static GLboolean do_texture_copypixels( GLcontext *ctx,
*
* XXX: do a copy to a temporary.
*/
+ if (src->buffer == dst->buffer)
{
- drm_clip_rect_t src;
- drm_clip_rect_t dst;
+ drm_clip_rect_t srcbox;
+ drm_clip_rect_t dstbox;
drm_clip_rect_t tmp;
- src.x1 = srcx;
- src.y1 = srcy;
- src.x2 = srcx + width;
- src.y2 = srcy + height;
+ srcbox.x1 = srcx;
+ srcbox.y1 = srcy;
+ srcbox.x2 = srcx + width;
+ srcbox.y2 = srcy + height;
- dst.x1 = dstx;
- dst.y1 = dsty;
- dst.x1 = dstx + width * ctx->Pixel.ZoomX;
- dst.y2 = dsty + height * ctx->Pixel.ZoomY;
+ dstbox.x1 = dstx;
+ dstbox.y1 = dsty;
+ dstbox.x1 = dstx + width * ctx->Pixel.ZoomX;
+ dstbox.y2 = dsty + height * ctx->Pixel.ZoomY;
- if (intel_intersect_cliprects(&tmp, &src, &dst)) {
+ if (intel_intersect_cliprects(&tmp, &srcbox, &dstbox)) {
if (INTEL_DEBUG & DEBUG_PIXEL)
_mesa_printf("%s: regions overlap\n", __FUNCTION__);
return GL_FALSE;