[Mesa-stable] [Mesa-dev] [PATCH 02/11] intel/isl: Don't align the height of the last array slice

Jordan Justen jordan.l.justen at intel.com
Thu Aug 3 17:05:56 UTC 2017


Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

On 2017-08-02 13:35:27, Jason Ekstrand wrote:
> We were calculating the total height of 2D surfaces by multiplying the
> row pitch by the number of slices.  This means that we actually request
> slightly more space than actually needed since the padding on the last
> slice is unnecessary.  For tiled surfaces this is not likely to make a
> difference.  For linear surfaces, on the other hand, this means we may
> require additional memory.  In particular, this makes the i965 driver
> reject EGL imports of buffers which do not have this extra padding.
> 
> Cc: "17.2" <mesa-stable at lists.freedesktop.org>
> Cc: Tomasz Figa <tfiga at chromium.org>
> ---
>  src/intel/isl/isl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> index d3124de..6b4203d 100644
> --- a/src/intel/isl/isl.c
> +++ b/src/intel/isl/isl.c
> @@ -982,7 +982,8 @@ isl_calc_phys_total_extent_el_gen4_2d(
>                                             &phys_slice0_sa);
>     *total_extent_el = (struct isl_extent2d) {
>        .w = isl_assert_div(phys_slice0_sa.w, fmtl->bw),
> -      .h = *array_pitch_el_rows * phys_level0_sa->array_len,
> +      .h = *array_pitch_el_rows * (phys_level0_sa->array_len - 1) +
> +           isl_assert_div(phys_slice0_sa.h, fmtl->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