summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_blit.c
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2015-07-24 14:52:01 -0700
committerAnuj Phogat <anuj.phogat@gmail.com>2015-09-28 15:00:53 -0700
commit945592f92ca91e21307d10b657835d512bacf8b8 (patch)
treee0fc80cf6d0ca8b0681fe9b52d6a0b162df6bc8d /src/mesa/drivers/dri/i965/intel_blit.c
parent1d8cba9b51b7a6e7dbf3f0d3f53b5c232fd0b5b2 (diff)
downloadexternal_mesa3d-945592f92ca91e21307d10b657835d512bacf8b8.zip
external_mesa3d-945592f92ca91e21307d10b657835d512bacf8b8.tar.gz
external_mesa3d-945592f92ca91e21307d10b657835d512bacf8b8.tar.bz2
i965/gen9: Add a condition for starting pixel in fast copy blit
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. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_blit.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_blit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 9184ad6..46fccc8 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -420,6 +420,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;