intel: Add some more safety asserts in the blit code.
authorEric Anholt <eric@anholt.net>
Sat, 8 Aug 2009 00:06:41 +0000 (17:06 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 8 Aug 2009 01:33:08 +0000 (18:33 -0700)
src/mesa/drivers/dri/intel/intel_blit.c

index 2e95bd1013f6bc25b58379c06473d34fdb869690..979f2025842f5f2bd845db987d50dbed8c003cde 100644 (file)
@@ -477,6 +477,8 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
                   BR13 |= BR13_565;
                }
 
+              assert(irb->region->tiling != I915_TILING_Y);
+
 #ifndef I915
               if (irb->region->tiling != I915_TILING_NONE) {
                  CMD |= XY_DST_TILED;
@@ -571,6 +573,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
 
    assert( logic_op - GL_CLEAR >= 0 );
    assert( logic_op - GL_CLEAR < 0x10 );
+   assert(dst_pitch > 0);
 
    if (w < 0 || h < 0)
       return GL_TRUE;