sna/dri: Add a couple of more asserts to track injection of a rogue bo

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-11-15 15:13:14 +00:00
parent d2897cb013
commit 866ed4a26c
1 changed files with 3 additions and 0 deletions

View File

@ -456,6 +456,9 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo)
struct sna_pixmap *priv = sna_pixmap(pixmap);
RegionRec region;
assert(pixmap->drawable.width * pixmap->drawable.bitsPerPixel <= 8*bo->pitch);
assert(pixmap->drawable.height * bo->pitch <= kgem_bo_size(bo));
/* Post damage on the new front buffer so that listeners, such
* as DisplayLink know take a copy and shove it over the USB,
* also for software cursors and the like.