[Mesa-dev] [PATCH 2/6] i965: Fix comments about blit constraints

Anuj Phogat anuj.phogat at gmail.com
Mon Aug 10 17:12:30 PDT 2015


On Mon, Aug 10, 2015 at 4:15 PM, Ben Widawsky
<benjamin.widawsky at intel.com> wrote:
>
> The spec does say that the blitter is capable of transferring 64k scanlines in a
> single blit operation. Perhaps this was true, or is still true on some
> operations, but for all commands that we use, we are restricted to 16b signed:
>
> For example, from the XY_SRC_COPY_CHROMA_BLT definition:
> > Destination Y2 Coordinate (Bottom)
> > 16 bit signed number.
>
> v2: Rebase; conflicts resolved with wiggle
>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> Reviewed-by: Neil Roberts <neil at linux.intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_blit.c       | 8 ++++++--
>  src/mesa/drivers/dri/i965/intel_copy_image.c | 8 ++++++--
>  2 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
> index 6d92580..4a76ba9 100644
> --- a/src/mesa/drivers/dri/i965/intel_blit.c
> +++ b/src/mesa/drivers/dri/i965/intel_blit.c
> @@ -298,11 +298,15 @@ intel_miptree_blit(struct brw_context *brw,
>      *    The BLT engine is capable of transferring very large quantities of
>      *    graphics data. Any graphics data read from and written to the
>      *    destination is permitted to represent a number of pixels that
> -    *    occupies up to 65,536 scan lines and up to 32,768 bytes per scan line
> -    *    at the destination. The maximum number of pixels that may be
> +    *    occupies up to 65,536 [sic] scan lines and up to 32,768 bytes per scan
> +    *    line at the destination. The maximum number of pixels that may be
>      *    represented per scan line’s worth of graphics data depends on the
>      *    color depth.
>      *
> +    * XXX: The spec is likely incorrect. The number of scanlines is represented
> +    * in the blit command as a 16b signed number, thus 32,767 as the max number
> +    * of scanlines.
> +    *
>      * Furthermore, intelEmitCopyBlit (which is called below) uses a signed
>      * 16-bit integer to represent buffer pitch, so it can only handle buffer
>      * pitches < 32k. However, the pitch is measured in bytes for linear buffers
> diff --git a/src/mesa/drivers/dri/i965/intel_copy_image.c b/src/mesa/drivers/dri/i965/intel_copy_image.c
> index 3706704..c12decc 100644
> --- a/src/mesa/drivers/dri/i965/intel_copy_image.c
> +++ b/src/mesa/drivers/dri/i965/intel_copy_image.c
> @@ -53,11 +53,15 @@ copy_image_with_blitter(struct brw_context *brw,
>      *    The BLT engine is capable of transferring very large quantities of
>      *    graphics data. Any graphics data read from and written to the
>      *    destination is permitted to represent a number of pixels that
> -    *    occupies up to 65,536 scan lines and up to 32,768 bytes per scan line
> -    *    at the destination. The maximum number of pixels that may be
> +    *    occupies up to 65,536 [sic] scan lines and up to 32,768 bytes per scan
> +    *    line at the destination. The maximum number of pixels that may be
>      *    represented per scan line’s worth of graphics data depends on the
>      *    color depth.
>      *
> +    * XXX: The spec is likely incorrect. The number of scanlines is represented
> +    * in the blit command as a 16b signed number, thus 32,767 as the max number
> +    * of scanlines.
> +    *
>      * Furthermore, intelEmitCopyBlit (which is called below) uses a signed
>      * 16-bit integer to represent buffer pitch, so it can only handle buffer
>      * pitches < 32k.
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the mesa-dev mailing list