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

Anuj Phogat anuj.phogat at gmail.com
Mon Aug 10 11:20:33 PDT 2015


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(+)

diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index bab7d90..bb8fc66 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -427,6 +427,10 @@ can_fast_copy_blit(struct brw_context *brw,
        dst_tr_mode == INTEL_MIPTREE_TRMODE_NONE)
       return false;
 
+   /* The start pixel for Fast Copy blit should be on an OWord boundary. */
+   if ((dst_x * cpp | src_x * cpp) & 15)
+      return false;
+
    /* For all surface types buffers must be cacheline-aligned. */
    if ((dst_offset | src_offset) & 63)
       return false;
-- 
2.4.3



More information about the mesa-dev mailing list