xf86-video-intel: 4 commits - src/sna/kgem.c src/sna/sna_composite.c src/sna/sna_glyphs.c src/sna/sna_trapezoids.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu May 31 09:55:27 PDT 2012
src/sna/kgem.c | 6 +++++-
src/sna/sna_composite.c | 27 +++++++++++++++++++--------
src/sna/sna_glyphs.c | 6 ++----
src/sna/sna_trapezoids.c | 8 ++++----
4 files changed, 30 insertions(+), 17 deletions(-)
New commits:
commit dcc7ba8ccf95db1c265bd5492f041f94ce368b7a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu May 31 17:48:40 2012 +0100
sna/composite: Add debugging modes to disable acceleration
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index d281776..9dc3808 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -41,6 +41,9 @@
#define DBG(x) ErrorF x
#endif
+#define NO_COMPOSITE 0
+#define NO_COMPOSITE_RECTANGLES 0
+
#define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
Bool sna_composite_create(struct sna *sna)
@@ -450,10 +453,13 @@ sna_composite(CARD8 op,
src, mask, dst,
src_x, src_y,
mask_x, mask_y,
- dst_x, dst_y,
+ dst_x, dst_y,
width, height))
return;
+ if (NO_COMPOSITE)
+ goto fallback;
+
if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
@@ -526,13 +532,15 @@ sna_composite(CARD8 op,
goto out;
fallback:
- DBG(("%s -- fallback dst=(%d, %d)+(%d, %d), size=(%d, %d)\n",
+ DBG(("%s -- fallback dst=(%d, %d)+(%d, %d), size=(%d, %d): region=((%d,%d), (%d, %d))\n",
__FUNCTION__,
dst_x, dst_y,
dst->pDrawable->x, dst->pDrawable->y,
- width, height));
- if (op == PictOpSrc || op == PictOpClear)
- flags = MOVE_WRITE;
+ width, height,
+ region.extents.x1, region.extents.y1,
+ region.extents.x2, region.extents.y2));
+ if (op <= PictOpSrc && !dst->alphaMap)
+ flags = MOVE_WRITE | MOVE_INPLACE_HINT;
else
flags = MOVE_WRITE | MOVE_READ;
if (!sna_drawable_move_region_to_cpu(dst->pDrawable, ®ion, flags))
@@ -563,10 +571,10 @@ fallback:
DBG(("%s: fallback -- fbComposite\n", __FUNCTION__));
fbComposite(op, src, mask, dst,
- src_x, src_y,
+ src_x, src_y,
mask_x, mask_y,
- dst_x, dst_y,
- width, height);
+ dst_x, dst_y,
+ width, height);
out:
REGION_UNINIT(NULL, ®ion);
}
@@ -758,6 +766,9 @@ sna_composite_rectangles(CARD8 op,
RegionExtents(®ion)->x1, RegionExtents(®ion)->y1,
RegionExtents(®ion)->x2, RegionExtents(®ion)->y2));
+ if (NO_COMPOSITE_RECTANGLES)
+ goto fallback;
+
if (wedged(sna))
goto fallback;
commit 984400b95a879c7c020de14545ac2e1d9e759e05
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu May 31 16:56:21 2012 +0100
sna/glyphs: Don't apply drawable offsets twice
The offsets from image_from_pict() already include the drawable offset
so we need not apply them twice.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index 45c24d8..0de1f70 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1173,10 +1173,8 @@ glyphs_fallback(CARD8 op,
y -= region.extents.y1;
} else {
mask_image = dst_image;
- src_x -= x;
- src_y -= y;
- x += dst->pDrawable->x;
- y += dst->pDrawable->y;
+ src_x -= x - dst->pDrawable->x;
+ src_y -= y - dst->pDrawable->y;
}
do {
commit 7bbd445c8cbeb7bcea2c56c4deb9bf6ccf6f2497
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu May 31 16:45:03 2012 +0100
sna/trapezoids: Apply the drawable offset for the CPU migration
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index e604720..0fd1b03 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -4425,10 +4425,10 @@ trapezoid_span_fallback(CARD8 op, PicturePtr src, PicturePtr dst,
if (mask) {
RegionRec region;
- region.extents.x1 = dst_x;
- region.extents.y1 = dst_y;
- region.extents.x2 = dst_x + extents.x2;
- region.extents.y2 = dst_y + extents.y2;
+ region.extents.x1 = dst_x + dst->pDrawable->x;
+ region.extents.y1 = dst_y + dst->pDrawable->y;
+ region.extents.x2 = region.extents.x1 + extents.x2;
+ region.extents.y2 = region.extents.y2 + extents.y2;
region.data = NULL;
DBG(("%s: move-to-cpu\n", __FUNCTION__));
commit c5313620a2f66bc8daf211fc77a9c480a79ea271
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu May 31 15:06:16 2012 +0100
sna: Suppress flushes once we have cleared the kernel dirtiness
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 15261b6..537a6b0 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -2954,7 +2954,11 @@ void _kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
bool __kgem_flush(struct kgem *kgem, struct kgem_bo *bo)
{
/* The kernel will emit a flush *and* update its own flushing lists. */
- return kgem_busy(kgem, bo->handle);
+ if (!bo->needs_flush)
+ return false;
+
+ bo->needs_flush = kgem_busy(kgem, bo->handle);
+ return bo->needs_flush;
}
bool kgem_check_bo(struct kgem *kgem, ...)
More information about the xorg-commit
mailing list