[Mesa-dev] [PATCH] i965/gen9: Add a condition for starting pixel in fast copy blit

Chad Versace chad.versace at intel.com
Fri Sep 25 16:37:40 PDT 2015


On Mon 10 Aug 2015, Anuj Phogat wrote:
> This condition restricts the use of fast copy blit to cases
> where starting pixel of src and dst is oword (16 byte) aligned.
> 
> Many piglit tests (if using fast copy blit in Mesa) failed earlier
> because I missed adding this condition.Fast copy blit is currently
> enabled for use only with Yf/Ys tiling.
> 
> Cc: Ben Widawsky <benjamin.widawsky at intel.com>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/mesa/drivers/dri/i965/intel_blit.c | 4 ++++
>  1 file changed, 4 insertions(+)

> +   /* The start pixel for Fast Copy blit should be on an OWord boundary. */
> +   if ((dst_x * cpp | src_x * cpp) & 15)
> +      return false;
> +

Technically, it's (src_bo_base_address + src_offset + src_x * cpp) that
must be OWord-aligned. But src_bo_base_address is always 4K-aligned, and
there exist a check below that confirms that src_offset is
OWord-aligned. So... I believe checking the alignment of only the (dst_x
* cpp) component of (src_bo_base_address + src_offset + src_x * cpp) is
sufficient.

>     /* For all surface types buffers must be cacheline-aligned. */
>     if ((dst_offset | src_offset) & 63)
>        return false;

Reviewed-by: Chad Versace <chad.versace at intel.com>



More information about the mesa-dev mailing list