Mesa (10.1): i965: Fix the region's pitch condition to use blitter

Ian Romanick idr at kemper.freedesktop.org
Thu Feb 27 21:05:08 UTC 2014


Module: Mesa
Branch: 10.1
Commit: bef555409256346dba3e74f73c18d900c82572ad
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bef555409256346dba3e74f73c18d900c82572ad

Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Tue Jan  7 17:46:45 2014 -0800

i965: Fix the region's pitch condition to use blitter

intelEmitCopyBlit uses a signed 16-bit integer to represent
buffer pitch, so it can only handle buffer pitches < 32k.

Cc: mesa-stable at lists.freedesktop.org
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
(cherry picked from commit b3094d9927fe7aa5a84892262404aaad4d728724)

---

 src/mesa/drivers/dri/i965/intel_blit.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index b12ecca..7b36a63 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -200,9 +200,9 @@ intel_miptree_blit(struct brw_context *brw,
     * As a result of these two limitations, we can only use the blitter to do
     * this copy when the region's pitch is less than 32k.
     */
-   if (src_mt->region->pitch > 32768 ||
-       dst_mt->region->pitch > 32768) {
-      perf_debug("Falling back due to >32k pitch\n");
+   if (src_mt->region->pitch >= 32768 ||
+       dst_mt->region->pitch >= 32768) {
+      perf_debug("Falling back due to >=32k pitch\n");
       return false;
    }
 




More information about the mesa-commit mailing list