[Mesa-dev] [PATCH] util: remove some assertions in util_resource_copy_region()
Brian Paul
brianp at vmware.com
Mon Jun 13 15:56:06 UTC 2016
And update the comment.
Fixes piglit fbo-generatemipmap-formats GL_ARB_texture_compression.
---
src/gallium/auxiliary/util/u_surface.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index e48e47c..631e1f3 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -329,15 +329,14 @@ util_resource_copy_region(struct pipe_context *pipe,
return;
}
- /* check that region boxes are block aligned */
+ /* check that region boxes are block aligned.
+ * Note that compressed texture sizes don't have to be a multiple
+ * of the block size so we don't assert for that.
+ */
assert(src_box.x % src_bw == 0);
assert(src_box.y % src_bh == 0);
- assert(src_box.width % src_bw == 0 || src_box.width < src_bw);
- assert(src_box.height % src_bh == 0 || src_box.height < src_bh);
assert(dst_box.x % dst_bw == 0);
assert(dst_box.y % dst_bh == 0);
- assert(dst_box.width % dst_bw == 0 || dst_box.width < dst_bw);
- assert(dst_box.height % dst_bh == 0 || dst_box.height < src_bh);
/* check that region boxes are not out of bounds */
assert(src_box.x + src_box.width <=
--
1.9.1
More information about the mesa-dev
mailing list