xf86-video-intel: 3 commits - src/i830_batchbuffer.c src/i915_render.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Nov 30 06:05:16 PST 2009


 src/i830_batchbuffer.c |   10 ++++++++++
 src/i915_render.c      |   34 +++++++++++++++++++++++++---------
 2 files changed, 35 insertions(+), 9 deletions(-)

New commits:
commit cfcabc45140d19bfbfa4737c0a11cdbb042d11eb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Nov 30 13:58:30 2009 +0000

    i915: Disable centre-point sampling.
    
    I still have no idea how this is triggering failures, but it is. So
    revert until the problem is solved.
    
    Should fix once again:
    
      Bug 23803 [bisected i915] gnome characters disappear
      http://bugs.freedesktop.org/show_bug.cgi?id=23803
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/i915_render.c b/src/i915_render.c
index 9349873..b660af1 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -35,6 +35,8 @@
 #include "i915_reg.h"
 #include "i915_3d.h"
 
+#define PIXEL_CENTRE_SAMPLE 0
+
 struct formatinfo {
 	int fmt;
 	uint32_t card_fmt;
@@ -168,7 +170,9 @@ static Bool i915_get_dest_format(PicturePtr dest_picture, uint32_t * dst_format)
 				     (int)dest_picture->format);
 		return FALSE;
 	}
+#if PIXEL_CENTRE_SAMPLE
 	*dst_format |= DSTORG_HORT_BIAS(0x8) | DSTORG_VERT_BIAS(0x8);
+#endif
 	return TRUE;
 }
 
@@ -429,8 +433,13 @@ i915_prepare_composite(int op, PicturePtr source_picture,
 			return FALSE;
 		}
 
-		if (source_picture->filter == PictFilterNearest)
+		if (source_picture->filter == PictFilterNearest) {
+#if PIXEL_CENTRE_SAMPLE
 			intel->src_coord_adjust = 0.375;
+#else
+			intel->dst_coord_adjust = -0.125;
+#endif
+		}
 	}
 
 	if (mask != NULL) {
@@ -441,8 +450,13 @@ i915_prepare_composite(int op, PicturePtr source_picture,
 				return FALSE;
 			}
 
-			if (mask_picture->filter == PictFilterNearest)
-				intel->mask_coord_adjust = 0.375;
+			if (mask_picture->filter == PictFilterNearest) {
+#if PIXEL_CENTRE_SAMPLE
+			    intel->mask_coord_adjust = 0.375;
+#else
+			    intel->dst_coord_adjust = -0.125;
+#endif
+			}
 		}
 	}
 
commit 8f8b6bd03d275379918777eaf7f63c0157b7ed9d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Nov 30 14:03:40 2009 +0000

    i915: Whitespace
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/i915_render.c b/src/i915_render.c
index 0a260f3..9349873 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -656,15 +656,17 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
 			PICT_FORMAT_RGB(mask_picture->format)) {
 		    if (i915_blend_op[op].src_alpha) {
 			i915_fs_mul(out_reg,
-				i915_fs_operand(src_reg, W, W, W, W),
-				i915_fs_operand_reg(mask_reg));
+				    i915_fs_operand(src_reg, W, W, W, W),
+				    i915_fs_operand_reg(mask_reg));
 		    } else {
-			i915_fs_mul(out_reg, i915_fs_operand_reg(src_reg),
-				i915_fs_operand_reg(mask_reg));
+			    i915_fs_mul(out_reg,
+					i915_fs_operand_reg(src_reg),
+					i915_fs_operand_reg(mask_reg));
 		    }
 		} else {
-		    i915_fs_mul(out_reg, i915_fs_operand_reg(src_reg),
-			    i915_fs_operand(mask_reg, W, W, W, W));
+		    i915_fs_mul(out_reg,
+				i915_fs_operand_reg(src_reg),
+				i915_fs_operand(mask_reg, W, W, W, W));
 		}
 	    }
 	    if (dst_format == COLR_BUF_8BIT)
commit 47916ea9d351f0ce6dc34713d6c164b0032f9830
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Nov 30 13:58:06 2009 +0000

    debug: Enable dumping of batchbuffer [compile-time only]
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 6a4ece2..0c755d6 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -39,6 +39,8 @@
 #include "i830_ring.h"
 #include "i915_drm.h"
 
+#define DUMP_BATCHBUFFERS NULL /* "/tmp/i915-batchbuffers.dump" */
+
 static void intel_next_batch(ScrnInfoPtr scrn)
 {
 	intel_screen_private *intel = intel_get_screen_private(scrn);
@@ -153,6 +155,14 @@ void intel_batch_flush(ScrnInfoPtr scrn, Bool flush)
 	    MI_BATCH_BUFFER_END;
 	intel->batch_used += 4;
 
+	if (DUMP_BATCHBUFFERS) {
+	    FILE *file = fopen(DUMP_BATCHBUFFERS, "a");
+	    if (file) {
+		fwrite (intel->batch_ptr, intel->batch_used, 1, file);
+		fclose(file);
+	    }
+	}
+
 	dri_bo_unmap(intel->batch_bo);
 	intel->batch_ptr = NULL;
 


More information about the xorg-commit mailing list