[Mesa-dev] [PATCH] [RFC] i965/blit: bump some limits to 64k

Ian Romanick idr at freedesktop.org
Thu Jun 14 20:41:26 UTC 2018


On 06/14/2018 06:18 AM, Martin Peres wrote:
> This fixes screenshots using 8k+ wide display setups in modesetting.
> 
> Chris Wilson even recommended the changes in intel_mipmap_tree.c
> should read 131072 instead of 65535, but I for sure got confused by
> his explanation.
> 
> In any case, I would like to use this RFC patch as a forum to discuss
> why the fallback path is broken[1], and as to what should be the
> limits for HW-accelerated blits now that we got rid of the blitter
> usage on recent platforms.
> 
> Tested-by: Martin Peres <martin.peres at linux.intel.com> # HSW
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> 
> [1] https://fs.mupuf.org/corruption_8k%2B.png
> ---
>  src/mesa/drivers/dri/i965/intel_blit.c        | 2 +-
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
> index 90784c5b1958..458f8bd42857 100644
> --- a/src/mesa/drivers/dri/i965/intel_blit.c
> +++ b/src/mesa/drivers/dri/i965/intel_blit.c
> @@ -403,7 +403,7 @@ emit_miptree_blit(struct brw_context *brw,
>      * for linear surfaces and DWords for tiled surfaces.  So the maximum
>      * pitch is 32k linear and 128k tiled.
>      */
> -   if (blt_pitch(src_mt) >= 32768 || blt_pitch(dst_mt) >= 32768) {
> +   if (blt_pitch(src_mt) >= 65536 || blt_pitch(dst_mt) >= 65536) {
>        perf_debug("Falling back due to >= 32k/128k pitch\n");

Should this message be updated?

>        return false;
>     }
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 6b89bf6848af..7347ea8b99d8 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -523,7 +523,7 @@ need_to_retile_as_linear(struct brw_context *brw, unsigned row_pitch,
>     if (row_pitch < 64)
>        return true;
>  
> -   if (ALIGN(row_pitch, 512) >= 32768) {
> +   if (ALIGN(row_pitch, 512) >= 65536) {
>        perf_debug("row pitch %u too large to blit, falling back to untiled",
>                   row_pitch);
>        return true;
> @@ -3583,7 +3583,7 @@ can_blit_slice(struct intel_mipmap_tree *mt,
>                 unsigned int level, unsigned int slice)
>  {
>     /* See intel_miptree_blit() for details on the 32k pitch limit. */
> -   if (mt->surf.row_pitch >= 32768)
> +   if (mt->surf.row_pitch >= 65536)
>        return false;
>  
>     return true;
> 



More information about the mesa-dev mailing list