Mesa (master): intel: Bail on blits with non-tile-aligned offsets.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jun 24 02:36:52 UTC 2009


Module: Mesa
Branch: master
Commit: 1593a1bb3435728806f66fff72a90e72a9616083
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1593a1bb3435728806f66fff72a90e72a9616083

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jun 22 15:23:38 2009 -0700

intel: Bail on blits with non-tile-aligned offsets.

---

 src/mesa/drivers/dri/intel/intel_blit.c |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index e0596a5..75d315d 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -225,10 +225,18 @@ intelEmitCopyBlit(struct intel_context *intel,
    dri_bo *aper_array[3];
    BATCH_LOCALS;
 
-   if (dst_tiling == I915_TILING_Y)
-      return GL_FALSE;
-   if (src_tiling == I915_TILING_Y)
-      return GL_FALSE;
+   if (dst_tiling != I915_TILING_NONE) {
+      if (dst_offset & 4095)
+	 return GL_FALSE;
+      if (dst_tiling == I915_TILING_Y)
+	 return GL_FALSE;
+   }
+   if (src_tiling != I915_TILING_NONE) {
+      if (src_offset & 4095)
+	 return GL_FALSE;
+      if (src_tiling == I915_TILING_Y)
+	 return GL_FALSE;
+   }
 
    /* do space/cliprects check before going any further */
    do {
@@ -561,8 +569,12 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
    int dwords = ALIGN(src_size, 8) / 4;
    uint32_t opcode, br13, blit_cmd;
 
-   if (dst_tiling == I915_TILING_Y)
-      return GL_FALSE;
+   if (dst_tiling != I915_TILING_NONE) {
+      if (dst_offset & 4095)
+	 return GL_FALSE;
+      if (dst_tiling == I915_TILING_Y)
+	 return GL_FALSE;
+   }
 
    assert( logic_op - GL_CLEAR >= 0 );
    assert( logic_op - GL_CLEAR < 0x10 );




More information about the mesa-commit mailing list