summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2017-10-25 02:39:20 +0200
committerRoland Scheidegger <[email protected]>2017-10-25 19:52:24 +0200
commit20c77ae6390451a74e2463f02c49bd7fec3dd29c (patch)
treefa073698f2e0a05b4b8bb7455368a0576791f550 /src/gallium
parent7983adc60f2f3e4390b2dee98c30d7da14732b83 (diff)
gallium/util: remove some block alignment assertions
These assertions were revisited a couple of times in the past, and they still weren't quite right. The problem I was seeing (with some other state tracker) was a copy between two 512x512 s3tc textures, but from mip level 0 to mip level 8. Therefore, the destination has only size 2x2 (not a full block), so the box width/height was only 2, causing the assertion to trigger for src alignment. As far as I can tell, such a copy is completely legal, and because a correct assertion would get ridiculously complicated just get rid of it for good. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_surface.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index 5abf96625e0..0a79a25a439 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -324,16 +324,8 @@ util_resource_copy_region(struct pipe_context *pipe,
/* check that region boxes are block aligned */
assert(src_box.x % src_bw == 0);
assert(src_box.y % src_bh == 0);
- assert(src_box.width % src_bw == 0 ||
- src_box.x + src_box.width == u_minify(src->width0, src_level));
- assert(src_box.height % src_bh == 0 ||
- src_box.y + src_box.height == u_minify(src->height0, src_level));
assert(dst_box.x % dst_bw == 0);
assert(dst_box.y % dst_bh == 0);
- assert(dst_box.width % dst_bw == 0 ||
- dst_box.x + dst_box.width == u_minify(dst->width0, dst_level));
- assert(dst_box.height % dst_bh == 0 ||
- dst_box.y + dst_box.height == u_minify(dst->height0, dst_level));
/* check that region boxes are not out of bounds */
assert(src_box.x + src_box.width <= u_minify(src->width0, src_level));