i965: Fix the region's pitch condition to use blitter
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 8 Jan 2014 01:46:45 +0000 (17:46 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Wed, 26 Feb 2014 21:43:00 +0000 (13:43 -0800)
intelEmitCopyBlit uses a signed 16-bit integer to represent
buffer pitch, so it can only handle buffer pitches < 32k.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/intel_blit.c

index 2126f1be6e50d1d0929ead85558689f458162607..d4822727874db1af4a2856e94924165a47d84d47 100644 (file)
@@ -204,9 +204,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;
    }