summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_blitter.c
diff options
context:
space:
mode:
authorHenri Verbeet <[email protected]>2012-12-14 04:14:14 +0100
committerHenri Verbeet <[email protected]>2012-12-16 11:13:20 +0100
commitcf358a2b42b4c1c0a672f57d5962a5d70a22df33 (patch)
tree46bf012adb1dfae490bcb6b3f5ab815e11169504 /src/gallium/auxiliary/util/u_blitter.c
parenta9abaaafd8ecdaebdf8b1b7ef2ac1177aa51efca (diff)
gallium/u_blitter: Remove the overlapped blit assert from util_blitter_blit_generic().
This is used by st_BlitFramebuffer() / r600_blit(), and ARB_fbo allows overlapped blits, even though the result is undefined. No piglit regressions on r600g / CYPRESS. Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_blitter.c')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 49f01dec1ba..7c7e062194c 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -1053,29 +1053,6 @@ void util_blitter_custom_clear_depth(struct blitter_context *blitter,
0, PIPE_FORMAT_NONE, &color, depth, 0, NULL, custom_dsa);
}
-static
-boolean is_overlap(int dstx, int dsty, int dstz,
- const struct pipe_box *srcbox)
-{
- struct pipe_box src = *srcbox;
-
- if (src.width < 0) {
- src.x += src.width;
- src.width = -src.width;
- }
- if (src.height < 0) {
- src.y += src.height;
- src.height = -src.height;
- }
- if (src.depth < 0) {
- src.z += src.depth;
- src.depth = -src.depth;
- }
- return src.x < dstx+src.width && src.x+src.width > dstx &&
- src.y < dsty+src.height && src.y+src.height > dsty &&
- src.z < dstz+src.depth && src.z+src.depth > dstz;
-}
-
void util_blitter_default_dst_texture(struct pipe_surface *dst_templ,
struct pipe_resource *dst,
unsigned dstlevel,
@@ -1261,11 +1238,6 @@ void util_blitter_blit_generic(struct blitter_context *blitter,
return;
}
- /* Sanity checks. */
- if (dst->texture == src->texture &&
- dst->u.tex.level == src->u.tex.first_level) {
- assert(!is_overlap(dstx, dsty, 0, srcbox));
- }
/* XXX should handle 3d regions */
assert(srcbox->depth == 1);