[Mesa-dev] [PATCH 2/6] i965: Fix comments about blit constraints
Ben Widawsky
benjamin.widawsky at intel.com
Mon Mar 9 21:43:32 PDT 2015
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.
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
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 9500bd7..ee2a4ef 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -190,11 +190,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.
diff --git a/src/mesa/drivers/dri/i965/intel_copy_image.c b/src/mesa/drivers/dri/i965/intel_copy_image.c
index f4c7eff..bf6b5e7 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.3.1
More information about the mesa-dev
mailing list