i915: Don't emit 'empty' blit rectangles.
authorMichel Dänzer <michel@tungstengraphics.com>
Wed, 17 Oct 2007 16:26:31 +0000 (18:26 +0200)
committerMichel Dänzer <michel@tungstengraphics.com>
Wed, 17 Oct 2007 16:37:12 +0000 (18:37 +0200)
The hardware seems to interpret them differently and produce unexpected
results...

src/mesa/drivers/dri/i915/intel_blit.c

index b00b0d9e1b528111fa57b007a9e0fd7e4f2ea9e1..2d4d00edefdfddff3a372b8603a1ed523fd651d5 100644 (file)
@@ -402,6 +402,9 @@ intelClearWithBlit(GLcontext * ctx, GLbitfield mask)
             b = *box;
          }
 
+         if (b.x1 >= b.x2 || b.y1 >= b.y2)
+            continue;
+
          if (0)
             _mesa_printf("clear %d,%d..%d,%d, mask %x\n",
                          b.x1, b.y1, b.x2, b.y2, mask);