[Mesa-dev] [PATCH] util: remove some assertions in util_resource_copy_region()

Ilia Mirkin imirkin at alum.mit.edu
Mon Jun 13 15:56:53 UTC 2016


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Mon, Jun 13, 2016 at 11:56 AM, Brian Paul <brianp at vmware.com> wrote:
> 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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list