From cfcabc45140d19bfbfa4737c0a11cdbb042d11eb Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 30 Nov 2009 13:58:30 +0000 Subject: [PATCH] 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 --- src/i915_render.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/i915_render.c b/src/i915_render.c index 93498734..b660af18 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 + } } }