summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-06 09:02:36 -0600
committerBrian Paul <brianp@vmware.com>2009-08-07 13:48:26 -0600
commit513a82cb1bf3bdaaff8f1f3759f509bdd9b5f7d3 (patch)
tree8706ffda858a344fe35926dee44e264c0d0d67a3 /src/gallium
parentabb120fe5b191be087421a4af03a404c6e24f08b (diff)
util: use util_same_surface() to compare surface pointers
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_blit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index f7cc7dd375..739aa51564 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -328,8 +328,9 @@ util_blit_pixels(struct blit_state *ctx,
PIPE_TEXTURE_USAGE_SAMPLER, 0));
/* do the regions overlap? */
- overlap = (src == dst) && regions_overlap(srcX0, srcY0, srcX1, srcY1,
- dstX0, dstY0, dstX1, dstY1);
+ overlap = util_same_surface(src, dst) &&
+ regions_overlap(srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1);
/*
* Check for simple case: no format conversion, no flipping, no stretching,
@@ -343,7 +344,6 @@ util_blit_pixels(struct blit_state *ctx,
(dstX1 - dstX0) == (srcX1 - srcX0) &&
(dstY1 - dstY0) == (srcY1 - srcY0) &&
!overlap) {
- /* FIXME: this will most surely fail for overlapping rectangles */
pipe->surface_copy(pipe,
dst, dstX0, dstY0, /* dest */
src, srcX0, srcY0, /* src */