xf86-video-intel: src/sna/sna_accel.c src/sna/sna_dri.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Jun 16 04:46:23 PDT 2011


 src/sna/sna_accel.c |   90 ++++++++++++++++++++++++++--------------------------
 src/sna/sna_dri.c   |    2 -
 2 files changed, 46 insertions(+), 46 deletions(-)

New commits:
commit dd4ad11e0d432f3a8eff4574a241c16f8463278d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Jun 16 12:53:22 2011 +0100

    sna: compile fix.
    
    A pox on all those who write trivial patches, attempt to compile on a
    system not having dri2proto and just assume that all is good.
    
    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 0a0cd8f..e28ce46 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -800,6 +800,51 @@ static void sna_gc_move_to_cpu(GCPtr gc)
 		sna_drawable_move_to_cpu(&gc->tile.pixmap->drawable, false);
 }
 
+#define TRIM_BOX(box, d) do { \
+	if (box.x1 < 0) box.x1 = 0; \
+	if (box.x2 > d->width) box.x2 = d->width; \
+	if (box.y1 < 0) box.y1 = 0; \
+	if (box.y2 > d->height) box.y2 = d->height; \
+} while (0)
+
+#define CLIP_BOX(box, gc) \
+	if (gc->pCompositeClip) { \
+		BoxPtr extents = &gc->pCompositeClip->extents;\
+		if (box.x1 < extents->x1) box.x1 = extents->x1; \
+		if (box.x2 > extents->x2) box.x2 = extents->x2; \
+		if (box.y1 < extents->y1) box.y1 = extents->y1; \
+		if (box.y2 > extents->y2) box.y2 = extents->y2; \
+	}
+
+#define TRANSLATE_BOX(box, d) do { \
+	box.x1 += d->x; \
+	box.x2 += d->x; \
+	box.y1 += d->y; \
+	box.y2 += d->y; \
+} while (0)
+
+#define TRIM_AND_TRANSLATE_BOX(box, d, gc) do { \
+	TRIM_BOX(box, d); \
+	TRANSLATE_BOX(box, d); \
+	CLIP_BOX(box, gc); \
+} while (0)
+
+#define BOX_ADD_PT(box, x, y) do { \
+	if (box.x1 > x) box.x1 = x; \
+	else if (box.x2 < x) box.x2 = x; \
+	if (box.y1 > y) box.y1 = y; \
+	else if (box.y2 < y) box.y2 = y; \
+} while (0)
+
+#define BOX_ADD_RECT(box, x, y, w, h) do { \
+	if (box.x1 > x) box.x1 = x; \
+	else if (box.x2 < x + w) box.x2 = x + w; \
+	if (box.y1 > y) box.y1 = y; \
+	else if (box.y2 < y + h) box.y2 = y + h; \
+} while (0)
+
+#define BOX_EMPTY(box) (box.x2 <= box.x1 || box.y2 <= box.y1)
+
 static Bool
 sna_put_image_upload_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
 			 int x, int y, int w, int  h, char *bits, int stride)
@@ -1306,51 +1351,6 @@ sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 			sna_copy_boxes, 0, NULL);
 }
 
-#define TRIM_BOX(box, d) do { \
-	if (box.x1 < 0) box.x1 = 0; \
-	if (box.x2 > d->width) box.x2 = d->width; \
-	if (box.y1 < 0) box.y1 = 0; \
-	if (box.y2 > d->height) box.y2 = d->height; \
-} while (0)
-
-#define CLIP_BOX(box, gc) \
-	if (gc->pCompositeClip) { \
-		BoxPtr extents = &gc->pCompositeClip->extents;\
-		if (box.x1 < extents->x1) box.x1 = extents->x1; \
-		if (box.x2 > extents->x2) box.x2 = extents->x2; \
-		if (box.y1 < extents->y1) box.y1 = extents->y1; \
-		if (box.y2 > extents->y2) box.y2 = extents->y2; \
-	}
-
-#define TRANSLATE_BOX(box, d) do { \
-	box.x1 += d->x; \
-	box.x2 += d->x; \
-	box.y1 += d->y; \
-	box.y2 += d->y; \
-} while (0)
-
-#define TRIM_AND_TRANSLATE_BOX(box, d, gc) do { \
-	TRIM_BOX(box, d); \
-	TRANSLATE_BOX(box, d); \
-	CLIP_BOX(box, gc); \
-} while (0)
-
-#define BOX_ADD_PT(box, x, y) do { \
-	if (box.x1 > x) box.x1 = x; \
-	else if (box.x2 < x) box.x2 = x; \
-	if (box.y1 > y) box.y1 = y; \
-	else if (box.y2 < y) box.y2 = y; \
-} while (0)
-
-#define BOX_ADD_RECT(box, x, y, w, h) do { \
-	if (box.x1 > x) box.x1 = x; \
-	else if (box.x2 < x + w) box.x2 = x + w; \
-	if (box.y1 > y) box.y1 = y; \
-	else if (box.y2 < y + h) box.y2 = y + h; \
-} while (0)
-
-#define BOX_EMPTY(box) (box.x2 <= box.x1 || box.y2 <= box.y1)
-
 static Bool
 box_intersect(BoxPtr a, const BoxPtr b)
 {
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 7516fe9..20b323e 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -145,7 +145,7 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
 		list_add(&priv->list, &sna->dirty_pixmaps);
 
 	/* The bo is outside of our control, so presume it is written to */
-	priv->gpu_bo->need_flush = 1;
+	priv->gpu_bo->needs_flush = 1;
 
 	/* We need to submit any modifications to and reads from this
 	 * buffer before we send any reply to the Client.


More information about the xorg-commit mailing list