From e4a3cd3d16447b5d83d1c8c63c342f1240935267 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 1 Aug 2012 17:37:33 +0100 Subject: sna: Add validation of the clear flag to pixmap debugging Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index a4287f75..8760f915 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -314,6 +314,11 @@ static void assert_pixmap_damage(PixmapPtr p) if (priv == NULL) return; + if (priv->clear) { + assert(DAMAGE_IS_ALL(priv->gpu_damage)); + assert(priv->cpu_damage == NULL); + } + if (DAMAGE_IS_ALL(priv->gpu_damage) && DAMAGE_IS_ALL(priv->cpu_damage)) { /* special upload buffer */ assert(priv->gpu_bo && priv->gpu_bo->proxy); -- cgit v1.2.3