[Mesa-stable] [Mesa-dev] [PATCH 1/2] i965/blit: Fix the src dimension sanity check in miptree_copy

Pohjolainen, Topi topi.pohjolainen at gmail.com
Sun Dec 11 08:28:02 UTC 2016


On Tue, Dec 06, 2016 at 12:37:45PM -0800, Jason Ekstrand wrote:
> Cc: "13.0" <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/drivers/dri/i965/intel_blit.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
> index 03a35ee..5f0cf74 100644
> --- a/src/mesa/drivers/dri/i965/intel_blit.c
> +++ b/src/mesa/drivers/dri/i965/intel_blit.c
> @@ -421,8 +421,10 @@ intel_miptree_copy(struct brw_context *brw,
>  
>        assert(src_x % bw == 0);
>        assert(src_y % bh == 0);
> -      assert(src_width % bw == 0);
> -      assert(src_height % bh == 0);
> +      assert(src_width % bw == 0 ||
> +             src_x + src_width == minify(src_mt->logical_width0, src_level));
> +      assert(src_height % bh == 0 ||
> +             src_y + src_height == minify(src_mt->logical_height0, src_level));

Can you given example how we can blit sub-block worth of data? Above there is
check for src_x/y being block aligned don't all mipmap levels need to be
aligned as well?

>  
>        src_x /= (int)bw;
>        src_y /= (int)bh;
> -- 
> 2.5.0.400.gff86faf
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list