diff options
author | Brian Paul <[email protected]> | 2009-08-06 09:02:36 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-08-06 09:47:13 -0600 |
commit | 24fdf8aadb6cd1f98d0ce54a1e4f28cb964b99e0 (patch) | |
tree | 6d9bd4117e406b407589a029c94391f6967224a0 /src | |
parent | ffb1f9bded52aa9f53ed179f91186c9e8c59b8c8 (diff) |
util: use util_same_surface() to compare surface pointers
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/util/u_blit.c | 6 |
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 f7cc7dd3759..739aa51564e 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 */ |