[Mesa-stable] [Mesa-dev] [PATCH] i965: Fix assert conditions for src/dst x/y offsets

Kenneth Graunke kenneth at whitecape.org
Mon Mar 21 21:13:24 UTC 2016


On Monday, March 21, 2016 11:33:46 AM PDT Anuj Phogat wrote:
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/mesa/drivers/dri/i965/intel_copy_image.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_copy_image.c b/src/mesa/
drivers/dri/i965/intel_copy_image.c
> index 08b7623..ccb82b6 100644
> --- a/src/mesa/drivers/dri/i965/intel_copy_image.c
> +++ b/src/mesa/drivers/dri/i965/intel_copy_image.c
> @@ -140,9 +140,9 @@ copy_image_with_memcpy(struct brw_context *brw,
>     _mesa_get_format_block_size(src_mt->format, &src_bw, &src_bh);
>  
>     assert(src_width % src_bw == 0);
> -   assert(src_height % src_bw == 0);
> +   assert(src_height % src_bh == 0);
>     assert(src_x % src_bw == 0);
> -   assert(src_y % src_bw == 0);
> +   assert(src_y % src_bh == 0);
>  
>     /* If we are on the same miptree, same level, and same slice, then
>      * intel_miptree_map won't let us map it twice.  We have to do things a
> @@ -153,7 +153,7 @@ copy_image_with_memcpy(struct brw_context *brw,
>  
>     if (same_slice) {
>        assert(dst_x % src_bw == 0);
> -      assert(dst_y % src_bw == 0);
> +      assert(dst_y % src_bh == 0);
>  
>        map_x1 = MIN2(src_x, dst_x);
>        map_y1 = MIN2(src_y, dst_y);
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20160321/02f52e30/attachment.sig>


More information about the mesa-stable mailing list