xf86-video-intel: 2 commits - src/sna/gen7_render.c src/sna/gen7_render.h src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Nov 12 04:05:54 PST 2011
src/sna/gen7_render.c | 10 +++-------
src/sna/gen7_render.h | 2 --
src/sna/sna_accel.c | 11 +++++++++--
3 files changed, 12 insertions(+), 11 deletions(-)
New commits:
commit 0269ec5533ecf7bec0f01c682e085861a3d2ab00
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Nov 12 11:49:32 2011 +0000
sna: Handle incremental uploads from PutImage
PutImage rarely uploads the entire image inside a single request,
instead breaking up into scanline segments to fit within the protocol
limits. A few optimisations are based on detecting when we can discard
the GPU bo for an all-dirty CPU pixmap, which are useful in this case so
check for an entirely dirty pixmap following an incremental PutImage.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 2dc86ca..df23707 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1381,9 +1381,16 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
assert_pixmap_contains_box(pixmap, RegionExtents(region));
sna_damage_subtract(&priv->gpu_damage, region);
sna_damage_add(&priv->cpu_damage, region);
- if (priv->flush)
- list_move(&priv->list, &sna->dirty_pixmaps);
+ if (sna_damage_is_all(&priv->cpu_damage,
+ pixmap->drawable.width,
+ pixmap->drawable.height)) {
+ sna_damage_destroy(&priv->gpu_damage);
+ if (priv->gpu_bo && !priv->pinned)
+ sna_pixmap_destroy_gpu_bo(sna, priv);
+ }
}
+ if (priv->flush)
+ list_move(&priv->list, &sna->dirty_pixmaps);
get_drawable_deltas(drawable, pixmap, &dx, &dy);
x += dx + drawable->x;
commit ed68f1b00ae7c0fb3be1f0e758b3683f3c26675b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Nov 12 11:13:59 2011 +0000
sna/gen7: Fix PRIMITIVE command
The topology is now an extra dword rather than an embedded field in the
command.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index d0bd545..5fe2599 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -991,8 +991,7 @@ static void gen7_magic_ca_pass(struct sna *sna,
OUT_BATCH(MI_FLUSH | MI_INHIBIT_RENDER_CACHE_FLUSH);
OUT_BATCH(GEN7_3DPRIMITIVE | (7- 2));
- OUT_BATCH(GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL |
- _3DPRIM_RECTLIST << GEN7_3DPRIMITIVE_TOPOLOGY_SHIFT);
+ OUT_BATCH(GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL | _3DPRIM_RECTLIST);
OUT_BATCH(sna->render.vertex_index - sna->render.vertex_start);
OUT_BATCH(sna->render.vertex_start);
OUT_BATCH(1); /* single instance */
@@ -1540,11 +1539,8 @@ static void gen7_emit_primitive(struct sna *sna)
return;
}
- OUT_BATCH(GEN7_3DPRIMITIVE |
- GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL |
- _3DPRIM_RECTLIST << GEN7_3DPRIMITIVE_TOPOLOGY_SHIFT |
- 0 << 9 |
- 4);
+ OUT_BATCH(GEN7_3DPRIMITIVE | (7- 2));
+ OUT_BATCH(GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL | _3DPRIM_RECTLIST);
sna->render_state.gen7.vertex_offset = sna->kgem.nbatch;
OUT_BATCH(0); /* vertex count, to be filled in later */
OUT_BATCH(sna->render.vertex_index);
diff --git a/src/sna/gen7_render.h b/src/sna/gen7_render.h
index e5b12bb..01482ec 100644
--- a/src/sna/gen7_render.h
+++ b/src/sna/gen7_render.h
@@ -161,8 +161,6 @@
/* 3DPRIMITIVE bits */
#define GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL (0 << 15)
#define GEN7_3DPRIMITIVE_VERTEX_RANDOM (1 << 15)
-/* Primitive types are in gen7_defines.h */
-#define GEN7_3DPRIMITIVE_TOPOLOGY_SHIFT 10
#define GEN7_SVG_CTL 0x7400
More information about the xorg-commit
mailing list