xf86-video-intel: 3 commits - configure.ac src/sna/fb src/sna/sna_accel.c src/xvmc/shader
Chris Wilson
ickle at kemper.freedesktop.org
Fri Oct 5 02:29:06 PDT 2012
configure.ac | 15 ++++-
src/sna/fb/fbblt.c | 4 -
src/sna/sna_accel.c | 120 +++++++++++++++--------------------------
src/xvmc/shader/mc/Makefile.am | 2
4 files changed, 61 insertions(+), 80 deletions(-)
New commits:
commit d717a67ff4a59d0c2cc108cedbecdc20b4c9fb97
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Oct 5 10:27:26 2012 +0100
configure: Make rebuilding of the gen4 assembly files explicit
References: https://bugs.freedesktop.org/show_bug.cgi?id=55646
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/configure.ac b/configure.ac
index c961d85..3ecf7ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,8 +81,19 @@ else
fi
fi
-
-PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
+AC_ARG_ENABLE(gen4asm,
+ AS_HELP_STRING([--enable-gen4asm],
+ [Enable rebuilding the gen4 assembly files [default=no]]),
+ [ASM="$enableval"],
+ [ASM=no])
+
+gen4asm=no
+if test x$ASM != "xno"; then
+ PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
+ if test x$ASM = "xyes" -a x$gen4asm != "xyes"; then
+ AC_MSG_ERROR([intel-gen4asm support requested but not found])
+ fi
+fi
AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
AC_ARG_ENABLE(udev,
commit 5b74a2dc5270094810ec0cf8039fd3b3ab0815b5
Author: Josh Triplett <josh at joshtriplett.org>
Date: Thu Oct 4 17:48:24 2012 -0700
Fix out-of-tree builds with intel-gen4asm installed
The make rules to compile shaders with intel-gen4asm referenced the .g4a
source files without using $(srcdir), which broke out-of-tree builds.
Reference .g4a source files via $(srcdir), and add $(srcdir) to m4's
include path, fixing out-of-tree builds.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55645
Signed-off-by: Josh Triplett <josh at joshtriplett.org>
diff --git a/src/xvmc/shader/mc/Makefile.am b/src/xvmc/shader/mc/Makefile.am
index 891849b..7e3f5b4 100644
--- a/src/xvmc/shader/mc/Makefile.am
+++ b/src/xvmc/shader/mc/Makefile.am
@@ -109,7 +109,7 @@ if HAVE_GEN4ASM
SUFFIXES = .g4a .g4b
.g4a.g4b:
- m4 $*.g4a > $*.g4m && intel-gen4asm -o $@ $*.g4m && intel-gen4asm -g 5 -o $@.gen5 $*.g4m && rm $*.g4m
+ m4 -I$(srcdir) $(srcdir)/$*.g4a > $*.g4m && intel-gen4asm -o $@ $*.g4m && intel-gen4asm -g 5 -o $@.gen5 $*.g4m && rm $*.g4m
$(INTEL_G4B): $(INTEL_G4I)
commit 07a46333477898cfc2020ba5da9a6a7a866b21a7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Oct 5 10:17:45 2012 +0100
sna: Refactor the fallback CopyArea to use the common region computation
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/fb/fbblt.c b/src/sna/fb/fbblt.c
index 62ed2a1..d4d20b6 100644
--- a/src/sna/fb/fbblt.c
+++ b/src/sna/fb/fbblt.c
@@ -270,8 +270,8 @@ fbBlt(FbBits *srcLine, FbStride srcStride, int srcX,
int alu, FbBits pm, int bpp,
Bool reverse, Bool upsidedown)
{
- DBG(("%s %dx%d, alu=%d, pm=%d, bpp=%d\n",
- __FUNCTION__, width, height, alu, pm, bpp));
+ DBG(("%s %dx%d, alu=%d, pm=%d, bpp=%d (reverse=%d, upsidedown=%d)\n",
+ __FUNCTION__, width, height, alu, pm, bpp, reverse, upsidedown));
if (alu == GXcopy && pm == FB_ALLONES && ((srcX|dstX|width) & 7) == 0) {
CARD8 *s = (CARD8 *) srcLine;
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 306302e..862b296 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -5000,6 +5000,43 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
return clip;
}
+static void
+sna_fallback_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
+ RegionPtr region, int dx, int dy,
+ Pixel bitplane, void *closure)
+{
+ DBG(("%s (boxes=%dx[(%d, %d), (%d, %d)...], src=+(%d, %d), alu=%d\n",
+ __FUNCTION__, RegionNumRects(region),
+ region->extents.x1, region->extents.y1,
+ region->extents.x2, region->extents.y2,
+ dx, dy, gc->alu));
+
+ if (!sna_gc_move_to_cpu(gc, dst, ®ion))
+ return;
+
+ if (src == dst ||
+ get_drawable_pixmap(src) == get_drawable_pixmap(dst)) {
+ if (!sna_drawable_move_to_cpu(dst, MOVE_WRITE | MOVE_READ))
+ goto out_gc;
+ } else {
+ RegionTranslate(region, dx, dy);
+ if (!sna_drawable_move_region_to_cpu(src, region, MOVE_READ))
+ goto out_gc;
+ RegionTranslate(region, -dx, -dy);
+
+ if (!sna_drawable_move_region_to_cpu(dst, region,
+ drawable_gc_flags(dst, gc, false)))
+ goto out_gc;
+ }
+
+ miCopyRegion(src, dst, gc,
+ region, dx, dy,
+ fbCopyNtoN, 0, NULL);
+ FALLBACK_FLUSH(dst);
+out_gc:
+ sna_gc_move_to_gpu(gc);
+}
+
static RegionPtr
sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc,
int src_x, int src_y,
@@ -5007,6 +5044,7 @@ sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc,
int dst_x, int dst_y)
{
struct sna *sna = to_sna_from_drawable(dst);
+ sna_copy_func copy;
if (gc->planemask == 0)
return NULL;
@@ -5017,86 +5055,18 @@ sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc,
dst_x, dst_y, dst->x, dst->y));
if (FORCE_FALLBACK || !ACCEL_COPY_AREA || wedged(sna) ||
- !PM_IS_SOLID(dst, gc->planemask)) {
- RegionRec region, *ret;
-
- DBG(("%s: fallback -- wedged=%d, solid=%d [%x]\n",
- __FUNCTION__, sna->kgem.wedged,
- PM_IS_SOLID(dst, gc->planemask),
- (unsigned)gc->planemask));
-
- region.extents.x1 = dst_x + dst->x;
- region.extents.y1 = dst_y + dst->y;
- region.extents.x2 = region.extents.x1 + width;
- region.extents.y2 = region.extents.y1 + height;
- region.data = NULL;
- RegionIntersect(®ion, ®ion, gc->pCompositeClip);
-
- DBG(("%s: dst extents (%d, %d), (%d, %d)\n",
- __FUNCTION__,
- region.extents.x1, region.extents.y1,
- region.extents.x2, region.extents.y2));
-
- {
- RegionRec clip;
-
- clip.extents.x1 = src->x - (src->x + src_x) + (dst->x + dst_x);
- clip.extents.y1 = src->y - (src->y + src_y) + (dst->y + dst_y);
- clip.extents.x2 = clip.extents.x1 + src->width;
- clip.extents.y2 = clip.extents.y1 + src->height;
- clip.data = NULL;
-
- DBG(("%s: src extents (%d, %d), (%d, %d)\n",
- __FUNCTION__,
- clip.extents.x1, clip.extents.y1,
- clip.extents.x2, clip.extents.y2));
-
- RegionIntersect(®ion, ®ion, &clip);
- }
- DBG(("%s: dst^src extents (%d, %d), (%d, %d)\n",
- __FUNCTION__,
- region.extents.x1, region.extents.y1,
- region.extents.x2, region.extents.y2));
-
- if (!RegionNotEmpty(®ion))
- return NULL;
-
- ret = NULL;
- if (!sna_gc_move_to_cpu(gc, dst, ®ion))
- goto out;
-
- if (!sna_drawable_move_region_to_cpu(dst, ®ion,
- drawable_gc_flags(dst, gc, false)))
- goto out_gc;
-
- RegionTranslate(®ion,
- src_x - dst_x - dst->x + src->x,
- src_y - dst_y - dst->y + src->y);
- if (!sna_drawable_move_region_to_cpu(src, ®ion, MOVE_READ))
- goto out_gc;
- RegionTranslate(®ion,
- -(src_x - dst_x - dst->x + src->x),
- -(src_y - dst_y - dst->y + src->y));
-
- ret = miDoCopy(src, dst, gc,
- src_x, src_y,
- width, height,
- dst_x, dst_y,
- fbCopyNtoN, 0, 0);
- FALLBACK_FLUSH(dst);
-out_gc:
- sna_gc_move_to_gpu(gc);
-out:
- RegionUninit(®ion);
- return ret;
- }
+ !PM_IS_SOLID(dst, gc->planemask))
+ copy = sna_fallback_copy_boxes;
+ else if (src == dst)
+ copy = sna_self_copy_boxes;
+ else
+ copy = sna_copy_boxes;
return sna_do_copy(src, dst, gc,
src_x, src_y,
width, height,
dst_x, dst_y,
- src == dst ? sna_self_copy_boxes : sna_copy_boxes,
- 0, NULL);
+ copy, 0, NULL);
}
static const BoxRec *
More information about the xorg-commit
mailing list