xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/sna_dri.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Jun 26 10:41:38 PDT 2011
src/sna/kgem.c | 2 +-
src/sna/sna_dri.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
New commits:
commit 44cd6ebf43aa5b7f23c03629a11cdf83b6e96e3a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Jun 26 18:41:20 2011 +0100
sna: Typo in debug assertion.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index fbc2952..27ed78c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1221,7 +1221,7 @@ static int kgem_bo_fenced_size(struct kgem *kgem, struct kgem_bo *bo)
int size;
assert(bo->tiling);
- assert(kgem->gem < 40);
+ assert(kgem->gen < 40);
if (kgem->gen < 30)
size = 512 * 1024;
commit 5cd7f5b59857f221bd3aa9965b43b938ff7824ed
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Jun 26 18:36:05 2011 +0100
sna/dri: Mark the GPU bo as damaged upon a page-flip
...so that CPU pixmap is correctly invalidated for the next readback.
For instance, if you were to take a screenshot on a composited destkop.
Reported-by: Sitosfe Wheeler <sitsofe at yahoo.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index de5312b..a553549 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -346,6 +346,20 @@ static void damage(DrawablePtr drawable, PixmapPtr pixmap, RegionPtr region)
}
}
+static void damage_all(PixmapPtr pixmap)
+{
+ struct sna_pixmap *priv;
+
+ priv = sna_pixmap(pixmap);
+ if (priv->gpu_only)
+ return;
+
+ sna_damage_all(&priv->gpu_damage,
+ pixmap->drawable.width,
+ pixmap->drawable.height);
+ sna_damage_destroy(&priv->cpu_damage);
+}
+
static void
sna_dri_copy(struct sna *sna, DrawablePtr draw, RegionPtr region,
DRI2BufferPtr dst_buffer, DRI2BufferPtr src_buffer,
@@ -628,6 +642,7 @@ sna_dri_schedule_flip(struct sna *sna,
/* Page flip the full screen buffer */
back_priv = info->back->driverPrivate;
+ damage_all(back_priv->pixmap);
info->count = sna_do_pageflip(sna,
back_priv->pixmap,
info, info->pipe,
@@ -1264,6 +1279,7 @@ sna_dri_async_swap(ClientPtr client, DrawablePtr draw,
}
exchange:
+ damage_all(back_priv->pixmap);
pixmap = sna_set_screen_pixmap(sna, back_priv->pixmap);
screen->DestroyPixmap(pixmap);
More information about the xorg-commit
mailing list