summaryrefslogtreecommitdiff
path: root/src/sna/gen8_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-11-11 11:00:38 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-11-11 11:00:38 +0000
commite769f9e6ca0b2575f598baf8e2f7dab02a48d6a0 (patch)
tree21eabd4c8fbdca9e49fcc049e4ab0f0c52d1a817 /src/sna/gen8_render.c
parentc94e653e2e150b74342da566197894b07fc6d4d4 (diff)
sna/video: Avoid dereferencing a masked pointer
First check for the damage-is-all special flag before adding to the damage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen8_render.c')
-rw-r--r--src/sna/gen8_render.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index 2a40bd12..0631e0a3 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -3886,7 +3886,8 @@ gen8_render_video(struct sna *sna,
}
gen8_vertex_flush(sna);
- sna_damage_add(&priv->gpu_damage, dstRegion);
+ if (!DAMAGE_IS_ALL(priv->gpu_damage))
+ sna_damage_add(&priv->gpu_damage, dstRegion);
return true;
}